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

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

    in version 3.0.3 it has changed again, use this to export your envars in command line

    file="/opt/elasticbeanstalk/deployment/env"
            while IFS=: read -r f1
            do
                export $f1
            done <"$file"
    

提交回复
热议问题