Creating Cron Jobs in cPanel

To create a Cron Job:

1. Log into cPanel for your hosting plan.

2. In the Advanced section, click Cron Jobs.
3. Under Cron Email, make sure the current email address is valid. If not, enter a new, valid email and click Update Email. You will receive an email after the cron job has finished.
4. Under Add New Cron Job, use the Common Settings drop-down menu to choose from a list of regularly used intervals; or set the frequency of your cron job by using the drop-down box next to each time unit. Common settings range from every minute to once a year.
5. In the Command field, enter the desired command.
Example: To run a cron job on a php file, use the following command making sure to substitute "yourCpanelUsername" with your actual your Cpanel Username and filename.php with the file name you are creating the job for:
/usr/local/bin/php -q /home/yourCpanelUsername/public_html/filename.php
6. Click Add New Cron Job.

Your Cron Job will then be execute a file at a certain time, date and repetition, according to the settings you selected.

Was this answer helpful?

Related Articles

Importing a MySQLdatabase using PHPMyAdmin in cPanel

Login to cPanel You can access cPanel in a number of ways:  Accesing cpanel through your Web...