Created
September 26, 2012 13:42
-
-
Save sburns/3788119 to your computer and use it in GitHub Desktop.
APScheduler demo
This file contains hidden or 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
from apscheduler.scheduler import Scheduler | |
from my_module import do_work_often, do_some_more_work | |
sched = Scheduler() | |
@sched.interval_schedule(hours=1) | |
def first_job(): | |
do_work_often() | |
@sched.cron_schedule(day_of_week='mon-sun', hour=1) | |
def second_job(): | |
do_some_more_work() | |
sched.start() | |
while True: | |
pass | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment