我正在尝试使用Advance Python Scheduler程序化地安排一些作业,我的问题是在文档中只提到了如何使用“interval”触发器类型进行调度,那“cron”和“date”类型呢?有没有关于APScheduler调度选项的完整文档?
例如:
例如:
#!/usr/bin/env python
from time import sleep
from apscheduler.scheduler import Scheduler
sched = Scheduler()
sched.start()
# define the function that is to be executed
def my_job(text):
print text
job = sched.add_job(my_job, 'interval', id='my_job', seconds=10, replace_existing=True, args=['job executed!!!!'])
while True:
sleep(1)
我该如何根据“日期”或“cron表达式”进行调度?
我正在使用最新的APScheduler版本3.0.2。
谢谢