[LRUG] Disrespectful cron
Dominic Mitchell
dom at happygiraffe.net
Wed Feb 14 10:07:54 PST 2007
Andrew Stewart wrote:
> On 13 Feb 2007, at 16:41, Dominic Mitchell wrote:
>
>> If that's a log file, you probably want to say:
>>
>> /usr/bin/ruby /home/deploy/cron_test.rb >> /home/deploy/cron.log
>>
>> Otherwise each run will wipe out the previous file.
>
> Excellent point. However, in this case, I don't mind what's actually
> in the output -- I was just looking for some output to be generated
> to determine whether or not cron was running my job.
One more thing -- that only redirects stdout. You may also want to
redirect stderr to the same file:
/usr/bin/ruby /home/deploy/cron_test.rb >> /home/deploy/cron.log 2>&1
-Dom
More information about the Chat
mailing list