django计划任务_使用装饰器
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了django计划任务_使用装饰器相关的知识,希望对你有一定的参考价值。
功能实现:每秒输出当前时间
from apscheduler.scheduler import Scheduler import datetime schedudler = Scheduler(daemonic=False) @schedudler.cron_schedule(day=‘*/1‘, hour=‘*/1‘,minute=‘*/1‘,second=‘*/1‘) def quote_send_sh_job(): print(‘a simple cron job start at‘, datetime.datetime.now()) schedudler.start()
APScheduler版本为2.1.2
本文出自 “我的博客” 博客,请务必保留此出处http://10552290.blog.51cto.com/10542290/1883094
以上是关于django计划任务_使用装饰器的主要内容,如果未能解决你的问题,请参考以下文章