Created
May 19, 2015 08:17
-
-
Save evblurbs/dbeff30b1d4664ff5a4b to your computer and use it in GitHub Desktop.
Elastic Beanstalk config file for Whenever gem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/01_cron.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
# Using similar syntax as the appdeploy pre hooks that is managed by AWS | |
set -xe | |
EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir) | |
EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir) | |
EB_DEPLOY_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir) | |
. $EB_SUPPORT_DIR/envvars | |
. $EB_SCRIPT_DIR/use-app-ruby.sh | |
cd $EB_DEPLOY_DIR | |
su -c "bundle exec whenever --update-cron" | |
su -c "crontab -l" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey! It seems that this approach is not working anymore, I am able to deploy app to beanstalk with such config but cron job is not being run. Do you know maybe how to make it work?