问题描述
我正在遵循此处的指南: https://devcenter.heroku.com/articles/clock-processes-python 和 https://devcenter.heroku.com/articles/python-rq
从本质上讲,我需要创建一个时钟进程,然后设置一个调度程序来执行时钟进程,但不确定如何在实际中工作。
from apscheduler.schedulers.blocking import BlockingScheduler
sched = BlockingScheduler()
@sched.scheduled_job('cron',day_of_week='mon-fri',hour=17)
def scheduled_job():
print('This job is run every weekday at 5pm.')
sched.start()
应该在后台任务部分(https://devcenter.heroku.com/articles/python-rq中的哪个地方调用scheduled_job
函数吗?
我得到了这两个宽松的文档,但不确定如何将它们绑在一起
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)