I run the example code and get nothing output

128 views
Skip to first unread message

Codefor

unread,
Feb 27, 2012, 10:26:28 PM2/27/12
to APScheduler
from datetime import datetime

from apscheduler.scheduler import Scheduler

# Start the scheduler
sched = Scheduler()
sched.start()

def job_function():
print "Hello World"

# Schedule job_function to be called every two hours
sched.add_interval_job(job_function, hours=2)

# The same as before, but start after a certain time point
sched.add_interval_job(job_function, hours=2, start_date='2010-10-10
09:30')

Alex Grönholm

unread,
Feb 29, 2012, 8:01:16 AM2/29/12
to apsch...@googlegroups.com
And what are you doing to prevent the main thread from exiting right
after the scheduler is started?
Reply all
Reply to author
Forward
0 new messages