def hourlyTask(): import datetime try: checkUpload() except: pass #重新把自己加入任务列表, 1小时候重新运行 cmd="%s\\hourlyTask.cmd %s"%(WORK_PATH, WORK_PATH) d=datetime.datetime.now()+datetime.timedelta(0, 60*60) scheduleTask(cmd, d.strftime("%H:%M:%S"), [])
def installTasks(): cmd = "%s\\dailyTask.cmd %s" % (WORK_PATH, WORK_PATH) scheduleTask(cmd, "00:00") cmd = "%s\\weeklyTask.cmd %s" % (WORK_PATH, WORK_PATH) scheduleTask(cmd, "00:00", ['Su,']) #'Su', 'M', 'T', 'W', 'Th', 'F', 'Sa' d = datetime.datetime.now() + datetime.timedelta(0, 1 * 60 * 60) cmd = "%s\\hourlyTask.cmd %s" % (WORK_PATH, WORK_PATH) scheduleTask(cmd, d.strftime("%H:00"), [])
def installTasks(): cmd="%s\\dailyTask.cmd %s"%(WORK_PATH, WORK_PATH) scheduleTask(cmd, "00:00") cmd="%s\\weeklyTask.cmd %s"%(WORK_PATH, WORK_PATH) scheduleTask(cmd, "00:00", ['Su,']) #'Su', 'M', 'T', 'W', 'Th', 'F', 'Sa' d=datetime.datetime.now()+datetime.timedelta(0, 1*60*60) cmd="%s\\hourlyTask.cmd %s"%(WORK_PATH, WORK_PATH) scheduleTask(cmd, d.strftime("%H:00"), [])