[LBo] cronjobs not working

Billy Pollifrone billy at silverbaseball.com
Sat Dec 16 04:43:08 CET 2006


Chris F.A. Johnson wrote:
> On Fri, 15 Dec 2006, Ben wrote:
> =

>> Hi, everyone...
>>
>> I've been trying to set up a simple cronjob that reboots my server
>> (Centos 4.3) every morning at 4.  Here's what I've been entering as root:
>>
>> crontab -e
>>
>> 0 4 * * * shutdown -r now
>>
>> This, however, doesn't work.  I've tested it with other times and
> =

>     Add the full path to the command, e.g. /usr/bin./shutdown.
> =

>     Better still, don't do it at all. What reason do you have to shut
>     the machine down?
> =


Unless it's a laptop, I'd just leave it running. If you get to using
cron jobs regularly, it would probably be wise to redirect root's mail
to a real email account, so the results would be emailed to you.
Redirecting stderr is helpful too. Obviously, it makes no sense for a
shutdown command, but just thought I'd add that.

-- =

(o_  Billy Pollifrone
//\  billy AT silverbaseball DOT com
V_/_ Linux User #433318 (http://counter.li.org)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://linuxbasics.org/pipermail/qna/attachments/20061216/1824e3a9/si=
gnature.pgp


More information about the QnA mailing list