APM: Crontab problem
Larry Hunter
lhunter at lhunter.com
Sun Jun 29 21:19:36 CDT 2003
The examples have two different spellings of the variable: QUERY_STRING and
QUIERY_STRING. If it's in the crontab job that way it might be the problem.
Also make sure the shebang line in the Perl program has the right path to
your Perl executable. If that path is not right, you'll get the "file not
found" message from trying to find the Perl executable. BTW I frequently
screw this up when developing on a Windows box to run on Linux or Unix.
At 08:53 PM 6/29/2003 -0500, David Murphy wrote:
>Im trying to load a script via crontab
>
>
>
>
>
>The cronttab entry is
>
>*/2 * * * * QUERY_STRING=Blah:Blah&& export QUIERY_STRING && cd
>/path/to/script && ./script.pl
>
>
>
>Some varations ive tried are
> * Putting the command in a sh file and running that
> * */2 * * * * QUERY_STRING=Blah:Blah; export QUIERY_STRING ;cd
> /path/to/script ; ./script.pl
> * */2 * * * * QUERY_STRING=Blah:Blah; export QUIERY_STRING ;cd
> /path/to/script ; perl script.pl
> * */2 * * * * QUERY_STRING=Blah:Blah; export QUIERY_STRING ;
> perl /path/to/script.pl
> * */2 * * * * QUERY_STRING=Blah:Blah; export QUIERY_STRING ;
> /path/to/script.pl
> * Writing a Perl script that issue system(QUERY_STRING=Blah:Blah;
> export QUIERY_STRING ;cd /path/to/script ; ./script.pl)
>
>None of these work but all of these if put into sh or bash run fine.
>
>
>
>
>
>What I get back via a cronemail is variable
>
>But one thing is constant it always in one way or another say file not found
>
>Either sh cant find it or perl cant or bin/sh couldnt find it.
>
>
>
>
>
>Anyhelp here would be awesome
>
>
>
>
>
>And 0755 is the permissions and owner ship of the file it to the user
>running the cron.
------------------------------------------------------------------------
Larry Hunter lhunter at lhunter.com http://lhunter.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/austin/attachments/20030629/83a5fde2/attachment.htm
More information about the Austin
mailing list