标签:执行时间 时间 tab ftime run sch pre turn install
python3.6 -m pip install croniter
import croniter
import datetime
def run_get_next_time(sched):
now = datetime.datetime.now()
cron = croniter.croniter(sched, now)
return [cron.get_next(datetime.datetime).strftime("%Y-%m-%d %H:%M")][0]
print(run_get_next_time("* * * * *"))
标签:执行时间 时间 tab ftime run sch pre turn install
原文地址:http://blog.51cto.com/hequan/2340169