added a cron mode. this will execute the script only once and then execute

This commit is contained in:
Johannes Findeisen 2020-09-07 03:16:55 +02:00
commit 9776448c89
3 changed files with 5 additions and 1 deletions

2
uplink
View file

@ -128,6 +128,8 @@ def run(config):
# with daemon.DaemonContext():
while True:
get_data(config)
if config["cron_mode"]:
exit(0)
time.sleep(config["interval"])