n0bel / PiClock

A Fancy Clock built around a monitor and a Raspberry Pi
MIT License
564 stars 182 forks source link

Not so much an issue as a call for help with crontab #260

Closed feh123 closed 6 months ago

feh123 commented 1 year ago

I have been trying to reboot my PiClock on a schedule with crontab. My code is:

01 19 * /sbin/reboot @reboot sleep 240 && /home/pi/PiClock/startup.sh

If I just reboot the Pi I only get to the Bullseye desktop on my monitor. So this code was my attempt to get the Pi software to re-install and then run startup.sh.

I have tried other variations like adding sh /home/pi/PiClock/startup.sh. I am missing something because the cronjob never works. Any ideas greatly appreciated.

SerBrynden commented 1 year ago

Did you try either of these methods: https://github.com/n0bel/PiClock/blob/master/Documentation/Install.md#setting-the-clock-to-auto-start

SerBrynden commented 1 year ago

Also, per the instructions, the auto-reboot setup should be done as root sudo crontab -e add the following line 01 19 * * * /sbin/reboot

But the PiClock auto-start should NOT root crontab -e add the following line @reboot sh /home/pi/PiClock/startup.sh

feh123 commented 1 year ago

Thanks @SerBrynden - I will try this tonight!

feh123 commented 1 year ago

And it worked brilliantly. Thanks!

SerBrynden commented 8 months ago

Recommend closing this issue.

feh123 commented 6 months ago

Thanks @SerBrynden