Creating Cron Jobs (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.

Add Feedback