Stanleytiew

Well-Known Member
May 9, 2005
143
0
166
I'm creating the following cron jobs

5 2 * * * /home/firstonl/public_html/customer/tollfree/pw_exp_check.php

but getting the following error:

/bin/sh: line 1: /home/firstonl/public_html/customer/tollfree/pw_exp_check.php: Permission denied

Can anybody help what wrong with the cronjob or what others setting required.
 

Stanleytiew

Well-Known Member
May 9, 2005
143
0
166
Your explanation is to general for a person who new to crob jobs, appreciate very much if you could give more details on how the command look like. Example will be much appreciated.
 

webignition

Well-Known Member
Jan 22, 2005
1,876
2
166
A shebang line tells the thing that opens the script what it should use to run the script.

Thatw would involve putting the following lines as the very first line in the PHP script:

Code:
#!/usr/bin/php
The latter method would involve specifying, within the cron entry, the same path to PHP as in the shebang line.

In your case:

Code:
5 2 * * * /usr/bin/php /home/firstonl/public_html/customer/tollfree/pw_exp_check.php
You'd probably find the second option more suitable.

As far as script permissions go, what are the permissions on /home/firstonl/public_html/customer/tollfree/pw_exp_check.php?