I have the following command that runs a shell script that launches several python scripts for me on reboot:
@reboot sh /home/pi/repos/launcher.sh >/home/pi/logs/cronlog 2>&1
I want to modify this however to where every night at 4am my raspberry pi will reboot automatically and launch that same shell script after it reboots. I've tried the following but for some reason it's not working and I get neither reboots nor the script running:
@reboot sh /home/pi/repos/launcher.sh >/home/pi/logs/cronlog 2>&1 0 4 * * * /sbin/shutdown -r
What exactly am I doing wrong? Do I need to have these both in one command? Ideally I just want to have my shell script be ran nightly and I figured rebooting would be a decent way to ensure that any instances of the script currently running would be removed prior to launching the script again.