My Linux machine reboot everyday at 0:00 UTC but I never set that. What could cause this happen?

I have an EC2 instance and it auto reboots every day. There is a broadcast message in the terminal before rebooting, like the following:

Broadcast message from root@ec2... (Sun 2021-03-28 00:01:50 UTC):

The system is going down for reboot at Sun 2021-03-28 00:02:50 UTC!

I have never set an auto reboot thing as far as I know. Is there a way I could see what caused the reboot, or somehow disable the reboot?

Any help appreciated!


Check out /var/log/cron or /var/log/daemon or one of the other logfiles in /var/log at around midnight timestamp - perhaps one of them will give you a clue what’s going on.

Also check /etc/crontab and /etc/cron.d/* - my bet is that there’s a cron job running at midnight every day that among other things reboots the instance.