Skip to content

Instantly share code, notes, and snippets.

@spikeheap
Last active December 30, 2015 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spikeheap/7858014 to your computer and use it in GitHub Desktop.
Save spikeheap/7858014 to your computer and use it in GitHub Desktop.
A sample crontab to run heating control
# Update the time from the RTC hourly
0 * * * * hwclock -s
# Post sensor readings to emoncms
* * * * * /root/ryan_scripts/tempToEmon.sh > /dev/null
* * * * * /root/ryan_scripts/heatingStateToEmon.sh > /dev/null
# Every morning, 6:30 to 7:00
30 6 * * * /root/ryan_scripts/switchHeatingOn.sh > /dev/null
0 7 * * * /root/ryan_scripts/switchHeatingOff.sh > /dev/null
# Mon, Fri 6pm to 7pm
0 18 * * 1,5 /root/ryan_scripts/switchHeatingOn.sh > /dev/null
0 19 * * 1,5 /root/ryan_scripts/switchHeatingOff.sh > /dev/null
# Tues, Weds, Thur 22:20 to 23:00
20 22 * * 2,3,4 /root/ryan_scripts/switchHeatingOn.sh > /dev/null
0 23 * * 2,3,4 /root/ryan_scripts/switchHeatingOff.sh > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment