首页 > 编程语言 > 详细

python 定时任务的执行

时间:2017-10-16 11:38:22      阅读:303      评论:0      收藏:0      [点我收藏+]

#coding=utf-8
import os,time
k=1
while k <2:
  now_time=time.strftime(‘%H_%M‘)
  if now_time == ‘21_00‘:
    print u"开始运行脚本:"
    os.chdir("E:\\test_object")
    os.system(‘Python all_test.py‘) #执行脚本
    print u"运行完成退出"
    break
  else:
    time.sleep(10)
    print now_time

python 定时任务的执行

原文:http://www.cnblogs.com/czb529514/p/7676074.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!