Skip to content

Commit

Permalink
Forgot that dyno reboot daily
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucie Daeye committed Jun 22, 2018
1 parent 2035837 commit 7e41454
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clock.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from apscheduler.schedulers.blocking import BlockingScheduler
import os

from networkapi.utility.delete_non_staff import delete_non_staff

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "networkapi.settings")

scheduler = BlockingScheduler()

scheduler.add_job(delete_non_staff, 'interval', week=1)
scheduler.add_job(delete_non_staff, 'cron', day_of_week='sun', hour=2, timezone='US/Eastern')

scheduler.start()

0 comments on commit 7e41454

Please sign in to comment.