🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: csu.unix.linux
Article #7

Re: Crontab errror

#7
From: Mike Loseke
Date: Mon, 07 Sep 1998 00:00
54 lines
2765 bytes
Thus spake <carheden@holly.colostate.edu>:
>Thanks a lot, it works great now with the command:
>
>0 0 * * * /usr/bin/local/elm -s "Daily Comics" carheden <
>/m/j/carheden/comics.txt
>
>(Sorry, I like 0's, unless you have a good reason why they're bad :)
>
>Unfortunatly, I also get a message from the daemon (this refers to the
>cron program, right):
>
>Sending mail...
>Mail sent!
>
>*************************************************
>Cron: The previous message is the standard output
>      and standard error of one of your cron commands.
>
>A little help on redirecting stdout.  Can I just append 2>/dev/null? 
>This will just send elm's screen output there, right, not my message.

 Try appending "1>/dev/null 2>&1" to the line and it should pipe all
output (except for what elm actually does) to /dev/null. "2>/dev/null"
should also work, but nothing replaces experience. :-)



>Mike Loseke wrote:
>>  You should give the full path to the executable and to the file as well.
>> You should be able to do a "which elm" at a shell prompt to find out
>> exactly where it is. It might be in /usr/bin/elm or /usr/local/bin/elm or
>> someplace like that.  You'll have to add the whole path in the crontab as
>> crond doesn't know about non-standard paths, or read your startup files,
>> to find binaries.
>> 
>>  For instance:
>> 
>> 1 0 * * * /usr/local/bin/elm -s "Daily Comics" username < /path/to/file
>> 
>> (I don't like using all zero's in a crontab.)
>> 
>> --
>>    Mike Loseke    | Users are simply nature's way of
>>  mike@verinet.com | keeping me from hogging the processor.
>
>-- 
>Adam
>carheden@holly.colostate.edu
>http://holly.ColoState.edu/~carheden


-- 
   Mike Loseke    | Users are simply nature's way of
 mike@verinet.com | keeping me from hogging the processor.
Technical Details
Message-ID: <6svuv0$snn$1@bamboo.verinet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35F010FF.F76B604B@holly.colostate.edu> <6spmc6$sif$1@bamboo.verinet.com> <35F2B6CC.969A402@holly.colostate.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 148df6,2fc132920a18f170
X-Google-Attributes: gid148df6,public
X-Google-Thread: 153cb4,2fc132920a18f170
X-Google-Attributes: gid153cb4,public
X-Google-Thread: 1159f7,2fc132920a18f170
X-Google-Attributes: gid1159f7,public
X-Google-Thread: 117ddd,2fc132920a18f170
X-Google-Attributes: gid117ddd,public
From: mike@bamboo.verinet.com (Mike Loseke)
Subject: Re: Crontab errror
Date: 1998/09/07
Message-ID: <6svuv0$snn$1@bamboo.verinet.com>
X-Deja-AN: 388614243
References: <35F010FF.F76B604B@holly.colostate.edu> <6spmc6$sif$1@bamboo.verinet.com> <35F2B6CC.969A402@holly.colostate.edu>
X-Complaints-To: usenet@cactus.verinet.com
X-Trace: cactus.verinet.com 905150240 19746 204.144.246.3 (7 Sep 1998 06:37:20 GMT)
Organization: Disco Pants and Haircuts
NNTP-Posting-Date: 7 Sep 1998 06:37:20 GMT
Newsgroups: csu.unix.linux,csu.cs,csu.unix,csu.cs.systems