pythonタイミングタスク

459 ワード

# -*- coding: utf-8 -*-  
from apscheduler.scheduler import Scheduler
import time,datetime 

def job_function():
    print 'a';

if __name__ == '__main__':
    sched = Scheduler()
    sched.daemonic = False
    sched.add_cron_job(job_function,day_of_week='*', hour='*', minute='*/30',second='5')
    sched.start()