Cron jobs working from cpanel

Spill your thoughts on here - there is always someone to join your conversation.

Moderator: nash

Forum rules
NOTE: Always ask and read answers before purchase!
You can even get Nash on the phone: 1(800)706-4019

Cron jobs working from cpanel

Postby nash » Mon Apr 12, 2010 12:58 pm

How to run a php file from cron job via cpanel?

Stick to following steps:

1. login to your cpanel
2. click cron icon
3. click standard
4. enter your email address for reporting if the cron is failed
5. choose the time what you want
6. enter the command, it depends on your server hosting.

the command should be like this:

Code: Select all
curl -s -o /dev/null http://yourdomain.com/your_script.php


if curl is disabled from your hosting service, you can try another way:

Code: Select all
lynx -dump http://yourdomain.com/your_script.php


if curl and lynx are disabled from your hosting service, you can try another way:

Code: Select all
/usr/bin/wget -O - /home/your_username/public_html/script.php


or

Code: Select all
GET http://yourdomain.com/your_script.php


if curl, lynx and wget are disabled from your hosting service, you can try another way:

Code: Select all
links http://yourdomain.com/your_script.php


7. save it


----------------------------

if none worked from anything above then you are welcome to host with us - as we have all the above requirements to run cron jobs via cpanel in place already -
User avatar
nash
Chief Developer
 
Posts: 3013
Joined: Mon Nov 01, 2004 12:07 pm
Location: Los Angeles, California

Return to General Talk

Who is online

Users browsing this forum: No registered users and 1 guest