From 1e155b4790b9ae8ba2747742aaf4ccfa361b8a75 Mon Sep 17 00:00:00 2001 From: matdenkas Date: Thu, 26 Dec 2024 20:57:20 -0600 Subject: [PATCH] Adding escape characters to date references --- tools/init_cron.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/init_cron.py b/tools/init_cron.py index b52e5a9..e2b01d0 100644 --- a/tools/init_cron.py +++ b/tools/init_cron.py @@ -219,8 +219,8 @@ def main(): file.write(line + "\n") - file.write('20 */1 * * * mkdir -p ./logs/Bird-Island_Water-Temperatue && docker exec semaphore-core python3 src/semaphoreRunner.py -d ColdStunning/Bird-Island_Water-Temperatue_120hr.json ColdStunning/Bird-Island_Water-Temperatue_114hr.json ColdStunning/Bird-Island_Water-Temperatue_108hr.json ColdStunning/Bird-Island_Water-Temperatue_102hr.json ColdStunning/Bird-Island_Water-Temperatue_96hr.json ColdStunning/Bird-Island_Water-Temperatue_90hr.json ColdStunning/Bird-Island_Water-Temperatue_84hr.json ColdStunning/Bird-Island_Water-Temperatue_78hr.json ColdStunning/Bird-Island_Water-Temperatue_72hr.json ColdStunning/Bird-Island_Water-Temperatue_66hr.json ColdStunning/Bird-Island_Water-Temperatue_60hr.json >> ./logs/Bird-Island_Water-Temperatue/$(date "+%Y")_$(date "+%m")_Bird-Island_Water-Temperatue.log 2>> ./logs/CRON.log\n') - file.write('25 */1 * * * mkdir -p ./logs/Bird-Island_Water-Temperatue && docker exec semaphore-core python3 src/semaphoreRunner.py -d ColdStunning/Bird-Island_Water-Temperatue_54hr.json ColdStunning/Bird-Island_Water-Temperatue_48hr.json ColdStunning/Bird-Island_Water-Temperatue_42hr.jsonColdStunning/Bird-Island_Water-Temperatue_36hr.json ColdStunning/Bird-Island_Water-Temperatue_30hr.json ColdStunning/Bird-Island_Water-Temperatue_24hr.json ColdStunning/Bird-Island_Water-Temperatue_18hr.json ColdStunning/Bird-Island_Water-Temperatue_12hr.json ColdStunning/Bird-Island_Water-Temperatue_6hr.json ColdStunning/Bird-Island_Water-Temperatue_3hr.json >> ./logs/Bird-Island_Water-Temperatue/$(date "+%Y")_$(date "+%m")_Bird-Island_Water-Temperatue.log 2>> ./logs/CRON.log\n') + file.write('20 */1 * * * mkdir -p ./logs/Bird-Island_Water-Temperatue && docker exec semaphore-core python3 src/semaphoreRunner.py -d ColdStunning/Bird-Island_Water-Temperatue_120hr.json ColdStunning/Bird-Island_Water-Temperatue_114hr.json ColdStunning/Bird-Island_Water-Temperatue_108hr.json ColdStunning/Bird-Island_Water-Temperatue_102hr.json ColdStunning/Bird-Island_Water-Temperatue_96hr.json ColdStunning/Bird-Island_Water-Temperatue_90hr.json ColdStunning/Bird-Island_Water-Temperatue_84hr.json ColdStunning/Bird-Island_Water-Temperatue_78hr.json ColdStunning/Bird-Island_Water-Temperatue_72hr.json ColdStunning/Bird-Island_Water-Temperatue_66hr.json ColdStunning/Bird-Island_Water-Temperatue_60hr.json >> ./logs/Bird-Island_Water-Temperatue/$(date "+\%Y")_$(date "+\%m")_Bird-Island_Water-Temperatue.log 2>> ./logs/CRON.log\n') + file.write('25 */1 * * * mkdir -p ./logs/Bird-Island_Water-Temperatue && docker exec semaphore-core python3 src/semaphoreRunner.py -d ColdStunning/Bird-Island_Water-Temperatue_54hr.json ColdStunning/Bird-Island_Water-Temperatue_48hr.json ColdStunning/Bird-Island_Water-Temperatue_42hr.jsonColdStunning/Bird-Island_Water-Temperatue_36hr.json ColdStunning/Bird-Island_Water-Temperatue_30hr.json ColdStunning/Bird-Island_Water-Temperatue_24hr.json ColdStunning/Bird-Island_Water-Temperatue_18hr.json ColdStunning/Bird-Island_Water-Temperatue_12hr.json ColdStunning/Bird-Island_Water-Temperatue_6hr.json ColdStunning/Bird-Island_Water-Temperatue_3hr.json >> ./logs/Bird-Island_Water-Temperatue/$(date "+\%Y")_$(date "+\%m")_Bird-Island_Water-Temperatue.log 2>> ./logs/CRON.log\n') file.write("\n") # Make sure file ends with a new line # Clear out the old cron file SAFELY