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

前端 未结 9 1183
没有蜡笔的小新
没有蜡笔的小新 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:22

    In case you need something similar for CodeIgniter:

    * * * * * root . /opt/elasticbeanstalk/support/envvars && /usr/bin/php /var/www/html/index.php controller method
    

    Example:

    * * * * * root . /opt/elasticbeanstalk/support/envvars && /usr/bin/php /var/www/html/index.php tasks pushNotification
    

    A more descriptive alternative:

    * * * * * root source /opt/elasticbeanstalk/support/envvars && /usr/bin/php /var/www/html/index.php tasks pushNotification
    

提交回复
热议问题