Post
Topic
Board Beginners & Help
Re: PHP & BAMT
by
Ei Cot
on 30/09/2012, 23:18:50 UTC
That's a very, very roundabout way to accomplish scheduled reboots.

If you really need an actual reboot, you probably should be using cron instead of creating a freaking PHP-based daemon.

Given that BAMT seems to be based on Debian, you can probably insert a cron job similar to:

Code:
* 0,6,12,18 * * * /sbin/shutdown -r now

That's a heck of a lot easier than installing PHP and manually adding a system service.  The "-r" in that command schedules a reboot, and the "now" schedules it for, well, right then and there.

Of course, if you have to reboot your server every six hours, you should probably look into the actual thing going wrong rather than just punting and rebooting the darn thing.