AWS Elastic Beanstalk: Running Cron.d script, missing Environment Variables

前端 未结 9 1278
没有蜡笔的小新
没有蜡笔的小新 2021-01-17 10:39

I\'m trying to run a PHP script that is triggered by a cron script (in cron.d). The script is triggered properly but it is missing the Elastic Beanstalk \"Environment Variab

9条回答
  •  渐次进展
    2021-01-17 11:17

    While searching for solutions to the same problem I ran into this blog post: http://sebgoo.blogspot.nl/2013/10/elastic-beanstalk-cron-command-and-rds.html. To summarize, you can load the Elastic Beanstalk environment variables using the opt/elasticbeanstalk/support/envvars file:

    0 3 * * * . /opt/elasticbeanstalk/support/envvars; some_command
    

    Hope this helps!

提交回复
热议问题