Commit a35b1949 authored by liyuanhong's avatar liyuanhong

修改了定时无效的bug3

parent 4134292e
Pipeline #140 failed with stages
{"time": {"dateTime": "2020-04-22 15:12:03", "date": "2020-04-22", "time": "15:12:03"}, "curDayTravel": {"todayTotalMilleage": 14894, "todayTotalOil": 1354, "todayTotalTime": 677, "theMilleage": 19690, "theOil": 1790, "theTime": 895}, "travelData": {"totalMilleage": 19690, "totalOil": 1790, "totalTime": 895}}
\ No newline at end of file
{"time": {"dateTime": "2020-04-22 15:12:03", "date": "2020-04-22", "time": "15:12:03"}, "curDayTravel": {"todayTotalMilleage": 17116, "todayTotalOil": 1556, "todayTotalTime": 778, "theMilleage": 21912, "theOil": 1992, "theTime": 996}, "travelData": {"totalMilleage": 21912, "totalOil": 1992, "totalTime": 996}}
\ No newline at end of file
......@@ -436,7 +436,8 @@ class AutoCarTimerService():
timeS = int(time.time())
timeArray = time.localtime(timeS)
datetime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
info = "[" + datetime + "]" + " 启动了模拟程序"
info = "[" + datetime + "]" + " 启动了模拟程序\n"
print(info)
self.writeToFile("result.txt", info, 0)
while True:
if self.isTimerStart(year,month,day,hour,minute,second):
......
This diff is collapsed.
......@@ -19,7 +19,7 @@ def startSimulaterService():
如果想要每天的9点自动执行一次轨迹行驶,则设置:year=0,month=0,day=0,hour=9,minute=0,second=0
如果想要每天的9点30自动执行一次轨迹行驶,则设置:year=0,month=0,day=0,hour=9,minute=30,second=0
'''
autoCarObj.startService(year=0,month=0,day=0,hour=0,minute=13,second=0)
autoCarObj.startService(year=0,month=0,day=0,hour=0,minute=24,second=0)
if __name__ == "__main__":
startSimulaterService()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment