in reply to Perl script in crontab

HocusPocus:

First, crontab doesn't invoke a shell for you, so your environment variables, paths, etc. aren't going to be set up the way you want. That may be part of your problem.

However, what prompted me to post is the use of sudo in your crontab. Why not just use sudo to put the job in the proper user's (bibatch) crontab? Then things would be a bit less Rube Goldbergesqueified.

...roboticus

Replies are listed 'Best First'.
Re^2: Perl script in crontab
by AbraKdabra (Initiate) on Nov 20, 2010 at 05:48 UTC
    I use sudo to call the script pagos.pl, because when then calls PROCESO_COBRANZAS.sh it runs ok (because that scripts NEEDS to be executed as bibatch), and, because I need that pagos.pl send emails as bibatch. I'm using bibatch's crontab.