Forum Moderators: coopster

Message Too Old, No Replies

cpanel crontab question

         

MisterT

2:26 am on Sep 25, 2006 (gmt 0)

10+ Year Member



I'm using a cpanel host to set-up a crontab.

I'm using the standard crontab manager to try and set-up a cron job. I haven't used this before...

Basically, I just need a crontab that will run a php script for me, rather than me having to open the script in a browser every half hour or so.

Lets say the script is located here on my website:

http://example.com/directory/script.php

Can anyone please tell me what I would enter as the command to run in the standard crontab manager in cpanel for that script?

If it helps, I know the server api is cgi.

Thanks!

[edited by: tedster at 5:35 am (utc) on Sep. 25, 2006]
[edit reason] use example.com [/edit]

dreamcatcher

7:18 am on Sep 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi MisterT,

Try the following:

php -q /home/serverpath/directory/script.php

Using your correct full server path.

dc

MisterT

4:21 pm on Sep 25, 2006 (gmt 0)

10+ Year Member



thanks for the reply. i actually emailed my host's support and they told me exactly what i needed to do (it was similar to what you said) apparently the host has a slightly different way of handling it.

dreamcatcher

8:21 pm on Sep 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep, the commands can differ. I use CPanel and thats the command that works for me, but on the CPanel forums they suggest different ways.

Glad you got sorted out.

dc