Re: Automated Shutdown Script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> ------------------------------
> 
> Message: 5
> Date: Fri, 2 Jul 2004 08:42:17 -0700 (MST)
> From: Mike <azmr@xxxxxxxxxxxxx>
> Subject: Re: Automated Shutdown Script
> To: For users of Fedora Core releases <fedora-list@xxxxxxxxxx>
> Cc: Michael Marsh <m@xxxxxxxx>
> Message-ID:
> 	<Pine.LNX.4.44.0407020837050.12668-100000@xxxxxxxxxxxxxxxxx>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> 
> On Fri, 2 Jul 2004, Michael Marsh wrote:
> 
> > Does anyone know how to make fedora shut down automatically at a 
> > certain time of day with a bash script?
> > 
> > Thanks in advance
> > Michael Marsh
> > m@xxxxxxxx
> 
> Here's one way.  Say you want to shutdown at 9:00 PM every 
> day.  Do the following as root:
> 
>    # crontab -e
>    0 21 * * * /sbin/shutdown -h now

This is a good way to do it.  I'd suggest only a slight difference.
Put the entry at the end of /etc/crontab and add 'root' in the user field,
so:

0 21 * * * root sbin/shutdown -h -t 600

Note that -t gives the number of seconds before shutdown, to give users 10
minutes before the system is yanked out from under them.  I prefer using
/etc/crontab because it keeps all my root cronjobs in one place, so I do not
lose track of them.

Just my 40% of a nickel.  Hope it helps.  Erik



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux