Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: vanurk on November 18, 2008, 10:08:00 PM
-
Hi,
i would like to know if it is possible to let my server shutdown automaticly every evening at eg 23.00. I can use bios to make it startup in the morning again.
Greets Steve
-
Hi..
yes, you can.. you need 2 scripts
one in /etc (for example), like this
KO=which poweroff
echo $KO
called shut_down.sh
and another one in /etc/cron.d/ like this
# Antivirus Statistics Crond Entry
#+-----------------------Minute (0-59)
#| +-------------------Hour of Day (0-23)
#| | +---------------Day of Month (1-31)
#| | | +-----------Month of Year (1-12)
#| | | | +-------Day of Week (0=Sun,6=Sat)
#v v v v v
3 0 * * * root /etc/shut_down.sh
called, for example, shutdown.cron
be sure that /etc/shut_down.sh can be executed
chmod 750 /etc/shut_down.sh
HTH
Ciao
Stefano
-
Hi..
yes, you can.. you need 2 scripts
one in /etc (for example), like this
KO=which poweroff
echo $KO
called shut_down.sh
and another one in /etc/cron.d/ like this
# Antivirus Statistics Crond Entry
#+-----------------------Minute (0-59)
#| +-------------------Hour of Day (0-23)
#| | +---------------Day of Month (1-31)
#| | | +-----------Month of Year (1-12)
#| | | | +-------Day of Week (0=Sun,6=Sat)
#v v v v v
3 0 * * * root /etc/shut_down.sh
called, for example, shutdown.cron
be sure that /etc/shut_down.sh can be executed
chmod 750 /etc/shut_down.sh
HTH
Ciao
Stefano
Why not just use the SME Server scripts and events for it? You do not need two scripts you can just hardcode the path to the shutdown script in your crontab file, makes management and overview a little easier.
-
Hi cactus..
you are right, but I wrote that script for SME 6.X and ported without any changes to SME 7.
:-)
Ciao
Stefano
-
What is this SME Server scripts and events. I would like to know the easiest way. I'm not really good in linux.
-
If you really want to know more about SME, you should read (someone says twice) the documentation.. link is above ;-)
Ciao
Stefano