Added sched module for the loop
This commit is contained in:
parent
7bf7043bc5
commit
a3011a1f1a
1 changed files with 14 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ from pathlib import Path
|
||||||
import signal
|
import signal
|
||||||
from socket import getfqdn
|
from socket import getfqdn
|
||||||
import argparse
|
import argparse
|
||||||
|
from paramecio.citoplasma import datetime
|
||||||
|
|
||||||
import sched, time
|
import sched, time
|
||||||
|
|
||||||
|
|
@ -153,6 +154,19 @@ def run_start(sc):
|
||||||
|
|
||||||
def start():
|
def start():
|
||||||
|
|
||||||
|
#Wait seconds to
|
||||||
|
|
||||||
|
while True:
|
||||||
|
|
||||||
|
sleep(2)
|
||||||
|
|
||||||
|
sec=datetime.now()
|
||||||
|
|
||||||
|
if sec[12:13]=='0':
|
||||||
|
break
|
||||||
|
|
||||||
|
print('Begin scheduler monit in %s...' % datetime.now())
|
||||||
|
|
||||||
s=sched.scheduler(time.time, time.sleep)
|
s=sched.scheduler(time.time, time.sleep)
|
||||||
run_start(s)
|
run_start(s)
|
||||||
s.run()
|
s.run()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue