I'm helping a friend with a server and it appears the server reboots every week on Sunday night. How can I figure out what is causing is the server to reboot? Aside from rebooting, the server appears to also be running maintenance scripts for their custom application. I am guessing there is something running both the maintenance and the reboot in one go.
This sounds like a crontab entry. I'd look through the
/etc/cron.weekly directory and also through root's crontab entries
Additionally look through your
/var/log/cron log file (on Fedora/CentOS/RHEL) or
/var/log/syslog (on Debian/Ubuntu). There will be lines that look like this:
Aug 12 08:17:01 manny CRON: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Aug 11 04:50:01 grinchy CROND: (root) CMD (/usr/lib64/sa/sa1 -S DISK 1 1)
Find the lines that correspond to when your server is rebooting.