Fedora 23,24,25,26,27 – reboot or shutdown with cron

‘reboot’ and ‘shutdown’ won’t work in a script, so add a fully pathed reboot or shutdown directly into root’s crontab

# crontab -e

Add the line to reboot at midnight everyday, shutdown at 10pm everynight

0 0 * * * /usr/sbin/reboot
#0 22 * * * /usr/sbin/shutdown -h now

Save and quit

:wq
Tagged with: , , , , , , , ,

Leave a Reply