Skip to content

Commit

Permalink
Adding escape characters to date references
Browse files Browse the repository at this point in the history
  • Loading branch information
matdenkas committed Dec 27, 2024
1 parent 885d324 commit 1e155b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/init_cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e155b4

Please sign in to comment.