Cron can schedule a Linux server reboot when a planned maintenance process requires one. An automatic reboot interrupts every service, so use a schedule only when there is a defined operational need.

Understanding cron jobs

A user crontab entry contains five time fields followed by a command: minute, hour, day of month, month and day of week. It runs with that user’s privileges and the scheduler’s configured time zone.

A reboot normally needs root privileges. Do not put it in an ordinary hosting user’s cPanel crontab.

Steps to schedule automatic server reboots

Before editing, confirm recovery console access, service startup, a suitable maintenance window and that the schedule will not interrupt backups or transfers. Record the server’s time zone and account for daylight-saving changes.

Check the installed command path:

command -v shutdown

Back up and review root’s existing crontab through your normal administrator process, then edit it:

sudo crontab -e

For example, the following schedules a reboot at 03:00 each Sunday, using a system where shutdown is at /usr/sbin/shutdown:

0 3 * * 0 /usr/sbin/shutdown -r now

Use the verified absolute path and the approved schedule for your server. Save without replacing unrelated jobs. Cron normally reads the changed crontab automatically.

Verifying your cron job

Inspect the saved entries:

sudo crontab -l

Check that the scheduler is running. The service is commonly cron on Debian/Ubuntu or crond on RHEL-based systems. Review its logs and, after the approved maintenance event, confirm uptime and application health.

Best practices

Document the schedule and notify affected users through your established maintenance process. A reboot does not itself install security updates, guarantee performance or avoid downtime.

To cancel future scheduled reboots, edit root’s crontab and remove only this entry. That does not cancel a separate shutdown already requested by another process.

Troubleshooting

Check the command path, privileges, time zone and actual scheduler logs. If the server does not return, use recovery access to investigate startup rather than repeatedly triggering another reboot.