python做定时任务
作者:互联网
from apscheduler.schedulers.blocking import BlockingScheduler def Uploading(): print(1) sched = BlockingScheduler() #Uploading是方法名,cron 是瞎定义的名字 sched.add_job(Uploading,'cron', hour=23) # 这是晚上11点,可以加分钟什么的 sched.start() Anew_Uploging()
能不能传参数可以看下 BlockingScheduler 库的用法
标签:sched,python,Uploading,cron,apscheduler,任务,schedulers,定时,BlockingScheduler 来源: https://www.cnblogs.com/azhaozhao/p/16205988.html