Skip to content

Commit

Permalink
Add crontabs file
Browse files Browse the repository at this point in the history
  • Loading branch information
db0company committed Oct 2, 2016
1 parent 2466bfe commit bdae7e0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .ebextensions/cron-notifications.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
option_settings:
aws:elasticbeanstalk:application:environment:
DJANGO_SETTINGS_MODULE: cpro_project.settings
PYTHONPATH: "/opt/python/current/app:$PYTHONPATH"
aws:elasticbeanstalk:container:python:
WSGIPath: "cpro_project/wsgi.py"

files:
"/etc/cron.d/cronjobs" :
mode: "000644"
owner: root
group: ec2-user
content: |
0 */2 * * * root source /opt/python/current/env && source /opt/python/run/venv/bin/activate && python /opt/python/current/app/manage.py cron_notifications >> /home/ec2-user/cronjob.log 2>&1
encoding: plain

commands:
clear_cron_backup:
command: rm -f /etc/cron.d/cronjobs.bak

0 comments on commit bdae7e0

Please sign in to comment.