PDA

View Full Version : Timed automatic reboot


leyshon
December 5th, 2008, 21:34
Hi

Does anyone have a script / command that I can install that will make a computer running freebsd reboot at a preset time of day (say 3:00 am) every day?

DutchDaemon
December 5th, 2008, 22:10
How about a simple cron job?

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

Mind you, 3 AM is a bad time, because a lot of administrative bookkeeping is going on at that time. Better make it 2 AM or 4 AM.

anomie
December 5th, 2008, 22:54
... make a computer running freebsd reboot at a preset time of day (say 3:00 am) every day?

Also: why do you want to do this?

davehouston
December 6th, 2008, 18:53
Also: why do you want to do this?

I'm also interested to know why your doing this?

tingo
December 7th, 2008, 01:42
Hi

Does anyone have a script / command that I can install that will make a computer running freebsd reboot at a preset time of day (say 3:00 am) every day?
It is better if you explain what you are trying to accomplish. Rebooting the machine is probably the wrong way to do it.
Are you trying to restart a service?

leyshon
December 8th, 2008, 23:56
Hi

I have a runaway process that I am trying to overcome. I am preparing a new installation to replace the present one because I have insufficient experience to figure out what is wrong with the present installation (which is already several upgrades old) Meanwhile a reboot solves a lot of problems.

anomie
December 9th, 2008, 00:35
@leyshon: Find the runaway process using ps (or top) and identify its PID. Then with that info, post the results of:

# fstat -p <pid_here>

Maybe someone can help you troubleshoot the problem.

SirDice
December 9th, 2008, 08:55
Meanwhile a reboot solves a lot of problems.
Not quite. It removes the symptoms but not the problem.