How do I make my autoplay OSMC sleep at 5pm and wake up at 8am? (with RTC!)

Success! The DS3231 real-time clock ticks!

Here is the cron I am using:

5 17 * * 1,2,3,4,5 /opt/vc/bin/tvservice -o
6 17 * * 1,2,3,4,5 systemctl stop mediacenter
0 8 * * 1,2,3,4,5 /sbin/shutdown -r now

On workday evenings it stops first HDMI output (putting the monitor to standby) and then kills Kodi. In the morning it simply restarts and loads my autoexec.py to automatically start playing a folder of videos on repeat.

Then for the RTC I also needed the following:

And lastly to make it sync hwclock with system time at boot add to /etc/rc.local:

hwclock -s

before “exit 0”

Thats it, all done!