-
Notifications
You must be signed in to change notification settings - Fork 22
gui_cron_tools
Pragmatismo edited this page Feb 19, 2023
·
3 revisions
Cron is used to run scripts at specified times on the raspberry pi, there are several tools in the pigrow that can be control how this happens
Allows you to pause and unpause a cron job, this is designed to be run by cron and used to do things like disable the camera when the lamp is turned off and turn it on again when the lamp is turned back on.
a typical cron job would look like;
30 7 * * * /home/pi/Pigrow/scripts/cron/cron_pause.py script=camcap.py pause=true
30 19 * * * /home/pi/Pigrow/scripts/cron/cron_pause.py script=camcap.py pause=false
This will pause any cron job containing the text 'camcap.py' at 7:30 AM by placing a # in front of the line then enable it at 7:30 PM by removing that hash.
This can also be used with a named sensor by supplying the string as it appears in cron, ensure to capture spaces by enclosing the value in speech marks;
cron_pause.py script="log_sensor_module.py name=bmetemp" pause=true