Cron jobs working from cpanel

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:

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

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

lynx -dump http://yourdomain.com/your_script.php

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

/usr/bin/wget -O – /home/your_username/public_html/your_script.php

or

GET http://yourdomain.com/your_script.php

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

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 –

 

 

One thought on “Cron jobs working from cpanel

Leave a Reply