how to add stuff to crontab without using crontab -e
Mikkel L. Ellertson
mikkel at infinity-ltd.com
Mon Apr 13 13:28:49 UTC 2009
Antonio Olivares wrote:
> Dear fellow Fedora users,
>
> I want to know if it is possible to edit/append to crontab
> without
using crontab -e. I have about 10 machines running Fedora and at the
end of the day I have to manually power them off (shutdown). For a
while, I started thinking about it, well I can make a crontab to
shutdown the machines at a certain time:
>
> Edit crontab to shutdown machines from student account at 4:15
every day(Monday-Friday) at school :) This way I don't have to shut
them down myself :)
>
You may want to try a different approach. I would think it would be
much easier to just add a shutdown file to /etc/cron.d The format is
slightly different - you have to specify the name of the user to
run as. You could create a file called poweroff containing:
# Power off the system weekdays at 4:15 pm.
#
15 16 * * 1-5 root /sbin/shutdown -h now
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20090413/c59380cb/attachment-0001.sig>
More information about the fedora-list
mailing list