Reputation: 63
When I try to run a Perl script which is called via Linux script manually it works fine but not executable via CRON.
Linux_scrip.sh conatains Perl_script and the command is,
perl_path/perl Perl_script.pl
I got perl_path using which perl
command.
Can anyone suggest why is it not executable via CRON
entry.
Upvotes: 1
Views: 103
Reputation: 87
Most probable cause is current working directory.
Before perl command execution, write a command to change directory.
Something like :
cd perl_path;
perl Perl_script.pl
Upvotes: 0
Reputation: 385506
Most likely suspects:
See the crontab
tag wiki for more pitfalls and some debugging tips.
The first thing you should do is to read the error message.
cron
job, but I've included it since it's quite a common problem for scripts run from other services.Upvotes: 3