cron jobs help

TarinC

New Member
Messages
698
Reaction score
0
Points
0
i never used cron jobs before, i dont like doing things wrong, so i need to double check. I want cron to run a php file.

Tell me if the following is right:
Click on cron jobs tab in cpanel
Click on Standard
Select the time you want to run the file
type in the "Command to run:"
I wrote "/home/cpanelusername/public_html/location/file.php"

is this correct or do i have to do something else?
 
Last edited:

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
Looks right. Just don't forget to fill in "cpanelusername", "location", and "file.php".
 

TarinC

New Member
Messages
698
Reaction score
0
Points
0
yea, they were examples.

i keep getting emailed:
/bin/sh: /home/cpanelusername/public_html/location/file.php: Permission denied

any ideas on why this is?
 
Last edited:

Chris S

Retired
Messages
2,055
Reaction score
1
Points
38
try something like

command:
php - /home/cpanelusername/public_html/location/file.php
 

TarinC

New Member
Messages
698
Reaction score
0
Points
0
it doesnt work... the following gets emailed to me, althought the file is there.

Status: 404
X-Powered-By: PHP/5.1.6
Content-type: text/html

No input file specified.
 
Last edited:

TarinC

New Member
Messages
698
Reaction score
0
Points
0
sorry for double post.. it works the first way, i had the wrong permissions on the file.. :nuts:

If i dont want cron to email me then i leave the email box empty?
 
Top