For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > March 2007 > perl cron help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author perl cron help
elroyerni

2007-03-28, 6:59 pm

Hi -

I wrote a perl script to monitor stuff in a log file and send me a
email if something funny happens. It works fine if I run it manually
via the command line and put it in the background:
../bofa.pl &

But if i set it to cron, I don't get a email even though I know I
should.. Any suggestions?
Here's my cron entry:
0 * * * * /u/dchun/bofa.pl & >> /dev/null 2>&1

Thanks,

usenet@DavidFilmer.com

2007-03-28, 6:59 pm

On Mar 28, 1:37 pm, "elroyerni" <davechu...@gmail.com> wrote:

> Here's my cron entry:
> 0 * * * * /u/dchun/bofa.pl & >> /dev/null 2>&1


It doesn't really make sense to background a cron process - they
already are running in the background.

There is also no need to redirect STDOUT or STDERR; the cron job is
not attached to a console.

elroyerni

2007-03-28, 6:59 pm

On Mar 28, 3:41 pm, use...@DavidFilmer.com wrote:
> On Mar 28, 1:37 pm, "elroyerni" <davechu...@gmail.com> wrote:
>
>
> It doesn't really make sense to background a cron process - they
> already are running in the background.
>
> There is also no need to redirect STDOUT or STDERR; the cron job is
> not attached to a console.


Thanks for the tip, i knew i was missing something dumb.. Let me try
it out. thanks again!

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com