How to set a cron job in CPanel to call a PHP or Web Page

To set a cron job in Cpanel to call a PHP or web page at any given times, do the following.

Go to Cpanel of your web site.

Log in to it.

Go to Cron Jobs. It is under the section called “Advanced”.

Cron Section

Click on it.

This will take you to a new screen as below.

Set Cron Job

One this screen, select the frequency of your choice from “Common Settings”.

Set Cron Job

In the “Command” text box, type the following syntax where http://www.your-site-name.com is the name of your web site.

curl -s http://www.your-web-site.com/path-to-your-file.php>/dev/null 2>&1

*Note:
Sometimes you configure your web site using .htaccess file to open it with or without “www” when someone types the URL. Make sure to follow the same rule here.

Leave a Reply

Your email address will not be published. Required fields are marked *


two × = 8

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>