Results 1 to 4 of 4
Can someone tell me how to create a script, that automaticly restarts the computer at for example 05:00!...
- 02-14-2007 #1Just Joined!
- Join Date
- Jan 2007
- Posts
- 42
Need help with timed restart script!
Can someone tell me how to create a script, that automaticly restarts the computer at for example 05:00!
- 02-14-2007 #2
You could have a cron job that executes a script containing,
Code:init 6
Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 02-14-2007 #3Just Joined!
- Join Date
- Jan 2007
- Posts
- 42
To be honnest, i didnt understand shi. of what u said, kinda newbie

So if someone could explain it the newbie way
Thanks.
- 02-14-2007 #4
A cron job is a script that is scheduled to run at a specific time. So if you had a restart script, you could set up a cron job to run it at 5am every day. Google a bit on cron jobs, and you'll see how easy it is to set up.
As for the restart script.That would do it, since "init 6" means "go to runlevel 6, and runlevel 6 means "reboot me". So save the previous code as a script -- e.g. restartscript.sh -- then make it executable by doing this,Code:#!/bin/sh init 6
Code:chmod +x restartscript.sh
Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode


Reply With Quote
