Last active
May 30, 2022 08:06
-
-
Save 1ycx/1bcc53ed064fd19c71ca9e797e392abf to your computer and use it in GitHub Desktop.
Cronjob for Alarm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# flush your motor circuit on reboot to avoid unexpected spray | |
@reboot /usr/bin/python3 /home/pi/alarm.py "flush" | |
# Refer to https://crontab.guru | |
# change 0 6 * * * to an expression of your choice | |
0 6 * * * /usr/bin/python3 /home/pi/alarm.py | |
# Experimental - syslog gets flushed on reboot, have to try another way | |
# cron logs to `stdout` syslog | |
# we also want to log `stderr` output to syslog with a CRON_ALARM tag | |
# 0 6 * * * /usr/bin/python3 /home/pi/alarm.py 2>&1 | /usr/bin/logger -t CRON_ALARM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment