System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

cronjob - lwp-request cmd cause error

 
jasonK_1
Frequent Advisor

cronjob - lwp-request cmd cause error

Hi,

I got the following error "sh: add: Execute permission denied." for a command in the crontab as follow: /opt/perl_32/bin/lwp-request -m GET www.xyz.com >/dev/null

Which part is wrong? I usually test a command out before add into the crontab.
5 REPLIES
Mel Burslan
Honored Contributor

Re: cronjob - lwp-request cmd cause error

make sure /opt/perl_32/bin/lwp-request -m GET www.xyz.com execute permission for the owner of the crontab, under which you are trying to run the script.

Also make sure the first line states something line

#!/usr/bin/perl

which should be the path to an existing perl interpreter binary. (I am assuming your script is in perl language here. If not, substitute my suggestion with the shell type you would like to run your script in.
________________________________
UNIX because I majored in cryptology...
jasonK_1
Frequent Advisor

Re: cronjob - lwp-request cmd cause error

Mel,

I run that command as root and the lwp-request mode is 755 also there is #!/opt/perl_32/bin/perl -w at the beginner of the script.
Patrick Wallek
Honored Contributor

Re: cronjob - lwp-request cmd cause error

The error message mentions "add". Is there a command or other script call "add" that is called from your lwp-request script?
jasonK_1
Frequent Advisor

Re: cronjob - lwp-request cmd cause error

Patrick,

I grep for add but nothing.
jasonK_1
Frequent Advisor

Re: cronjob - lwp-request cmd cause error

Don't know what the problem is but it went away.