Crontab calling php script

Hi there..

Just trying to figure out how to get a crontab to call a php script.

??

Should I be doing something else instead? I'm new to cron jobs, always just used Task Manager.

Thanks
 
Xoltaric said:
Hi there..

Just trying to figure out how to get a crontab to call a php script.

??

Should I be doing something else instead? I'm new to cron jobs, always just used Task Manager.

Thanks

I tried

/hsphere/local/home/username/subdomain.jodohost.com/directory/scripttorun.php

But I got...

/bin/sh:
/hsphere/local/home/username/subdomain.jodohost.com/directory/scripttorun.php: Permission denied

Hmmmm....?
 
Yash said:
You'll need some basic knowledge of unix shell commands. A tutorial should be available for that somewhere on the Internet. Here's some information how to use crontab:

http://www.jodohost.com/hsphere/direct_access_to_server.html

Ok.. I think I understand. I have to use PHP in CLI mode... so I have to first establish php as the interpreter. For that I need the path to php on the server.....

?

Right now I think it is trying to run my php as shell commands.
 
After taking ages to work out the crontab is under "FTP/User Account" > FTP User I have the following problem..

Everytime the cronjob is executed it writes a file to my user directory, with an incrementing file extension (so .1, .2, .3 .... .39483) and show no signs of stopping.

Example of the command im running is:
/bin/sh: wget -q http://bla.website.bla/cron.php > /dev/null

Does anyone else have this problem?
Any advice?

Cheers,
Gareth
 
Back
Top