美文网首页
python定时任务

python定时任务

作者: _mouse_ | 来源:发表于2017-12-04 16:42 被阅读0次
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from time import sleep
import datetime
import time
import subprocess
time1=1
str=time.strftime("%M",time.localtime())
while True:
    if(str == "30"):
        print("已到30分")
    print("定时程序")
    sleep(time1)
    str=time.strftime("%H",time.localtime())

相关文章

网友评论

      本文标题:python定时任务

      本文链接:https://www.haomeiwen.com/subject/gcmxixtx.html