1

For whatever my reasons, I want to restart my Ubuntu server every 6 hours via cronjob. I added a cronjob in crontab -e being the following:

* */6 * * * root /sbin/shutdown -r now

however I just checked my uptime and it's 10+ hours.

Any ideas?

Dan
  • 23

1 Answers1

3

Full reboots are not recommended like this. I think you are already aware of this so here's an answer to your question.

I suspect that your problem is that the contrab -e command is designed for a user to add their own cron scripts. It's not generally used for adding system (root) cron entries.

I believe you would be better to manually add a file in /etc/crontab.d/ or even add an entry in /etc/crontab.