Last active
August 24, 2016 20:48
-
-
Save bru/2763fd3327d6608340c4103c542cddfd to your computer and use it in GitHub Desktop.
Elastic Beanstalk extension to run a cron job
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: | |
"/tmp/cronjob" : | |
mode: "000777" | |
owner: webapp | |
group: webapp | |
content: | | |
# retrieve assets | |
* * * * * bash -l -c "/usr/local/bin/wp --allow-root --path='/var/app/current/blog1/' eval 'fetch_external();'" >> /var/log/httpd/wp-cli.log 2>&1 | |
* * * * * bash -l -c "/usr/local/bin/wp --allow-root --path='/var/app/current/blog2/' eval 'fetch_external();'" >> /var/log/httpd/wp-cli.log 2>&1 encoding: plain | |
commands: | |
setup_jobs: | |
command: crontab /tmp/cronjob |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment