Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
autoCarTimer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李远洪
autoCarTimer
Commits
a35b1949
Commit
a35b1949
authored
Apr 22, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了定时无效的bug3
parent
4134292e
Pipeline
#140
failed with stages
Changes
4
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
339 deletions
+5
-339
data/protocolTools/carData/M202003060520.json
data/protocolTools/carData/M202003060520.json
+1
-1
lib/socket/service/AutoCarTimerService.py
lib/socket/service/AutoCarTimerService.py
+2
-1
result.txt
result.txt
+1
-336
start.py
start.py
+1
-1
No files found.
data/protocolTools/carData/M202003060520.json
View file @
a35b1949
{
"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
lib/socket/service/AutoCarTimerService.py
View file @
a35b1949
...
...
@@ -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
):
...
...
result.txt
View file @
a35b1949
This diff is collapsed.
Click to expand it.
start.py
View file @
a35b1949
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment