LOCKLOSE 发表于 2017-4-26 09:41:07

python 定时任务

# -*- 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()
页: [1]
查看完整版本: python 定时任务