Knowledgebase
Cron jobs in CPanel
|
*This article assumes you are already logged into CPanel* In cpanel you will see an icon labeled as Cron Jobs. Click on it. This page will have 2 buttons. These are: Standard / Advanced (Unix Style) Click on the button labeled as Standard to proceed to the next page. You will see several options on this page. These are: Please enter an email address where the cron output will be sent: First, fill out the box at the top of the page with the email address where all the cron (scheduled tasks) reports will be sent to. Now, in the second box down this is where you will type in the command that you will be setting up the cron job to perform. Do so now. Once you have done this, select from amongst the boxes below the designated time(s) that the script will run. After doing this, click on the button labeled as Save Crontab. This will take you to a new page telling you that the new cron job has been setup. If you already know how to setup a cron job and have experience with it then you may skip right to the button labeled as Advanced. To setup a cron job in the Advanced section do the following: Enter the email address where the email containing the cron job reports will be sent at the top of the page. Next, you will see several boxes. These are: Minute Hour Day Month Weekday Command The default setup is: * * 0 0 0 which means that the script will be run at midnight. You can modify the settings to anything you wish simply by changing the values in the boxes. Once you have done so, enter the command that will be performed in the box labeled as command. For CRON commands running php scripts, you will need to add: "/usr/bin/home/php" to the front of each command to tell cron where PHP is. If however you find that this does not work, simply remove the "/home" leaving "/usr/bin/php" as some of our servers are configured differently. Now, click on the button labeled as Commit Changes. You will be taken to a new page where it will tell you that the cron job has been created. |



