exec ok in Perl but not as a cron
exec '/home/john/www/www.example.com/cgi-bin/main.pl automatic';
works OK in Perl program
The following in a crontab:
10 * * * * /home/john/www/www.example.com/cgi-bin/main.pl automatic
Can't locate Library.pm in @INC
use lib '../';
use Library; my $library=new Library;
Re: exec ok in Perl but not as a cron
"Ben Morrow" <email@example.com> wrote in message
> Quoth "John" <firstname.lastname@example.org>:
>> exec '/home/john/www/www.example.com/cgi-bin/main.pl automatic';
>> works OK in Perl program
>> The following in a crontab:
>> 10 * * * * /home/john/www/www.example.com/cgi-bin/main.pl automatic
>> Can't locate Library.pm in @INC
>> main.pl begins:-
>> use lib '../';
> Here's your problem. cron isn't running the script from the directory
> you expect. Put an absolute path there instead.
Many thanks. Done that and it is working from cron.
|All times are GMT. The time now is 06:59 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.