Automatic schedule for shut down
-
Hi @,
is it possible to set an automatically schedule for shut down the server?Regards
-
To power off? Add a cron job (see cron package) to run 'shutdown -p now' at the time you want to power off.
-
sorry "shutdown -p time"
-p a schedule every day at time indicate? -
The cron job sets the time itself - the shutdown will run when the cron job kicks off. (eg: 0 5 * * * /root/batch.sh - this will run the 'batch.sh' script at 5am every day). See the following link for the correct syntax: http://www.computerhope.com/unix/ucrontab.htm
-
There's a Cron package with GUI. Would probably be less error prone, plus permanent.
-
There's a Cron package with GUI. Would probably be less error prone, plus permanent.
Yes, use that to create it.
sorry "shutdown -p time"
-p a schedule every day at time indicate?Just run exactly "shutdown -p now" with cron at the time you want to shut it down. Cron controls the time, just let the shutdown run 'now'. The -p tells it to power off the system.