Reputation: 1
I have created a cron job, which will reboot the system every day at 00:01 (AM), but as soon as the system comes back up and the cron daemon is back up (within the same minute) - another reboot occurs (which makes sense).
How can this be prevented without using a bash script that will sleep 24 hours? I am using Ubuntu Server 16.04 LTS 64bit.
Upvotes: 0
Views: 98
Reputation:
Taken from this answer, you can just delay the reboot itself, which will solve your problem.
0 4 * * * /sbin/shutdown -r +5
Upvotes: 3