How To Set Up A Cron Job Print

  • 153

This article is going to show you how to setup a cron job in cPanel the simple way. You could create a command or script to run at a specified time every day , week, etc. This article will presume that you're logged into your cPanel. In case you're having difficulty doing that, be sure to see the article named "How to Login to cPanel".

Scroll down to the Advanced Section on the main page of your cPanel, and click on the icon called Cron Jobs. This will bring you to the main Cron Job page, the place where it lists two different experience levels to pick from : Standard and Advanced (Unix Style). This article is going to teach the Standard approach.

Press on the Standard Button. This will take you to a screen showing a Standard Cron Manager. Whenever a cron job runs, the results are sent to an email address . The upper line asks for the email address where you would prefer the cron job results delivered. Enter that address into the box. Down below is a box marked Entry 1. The first line is Command to Run: with a box after. Inside the box you have to type in the command of the script you want to run, including the path (all the way from root) For instance,, a command might look like this: "home/abc123/public_html/cgi-bin/clients.cgi" This command includes the entire path, all the way from the root directory.

Next , we should specify the timing of the cron. We must determine the time and how often we would like the script to run . There are boxes with different item listings above them - Minute(s), Hour(s), Day(s), Month(s), Weekday(s). Using the details inside each box, set the time, day, month, and day of the week you want your cron to run. If it is all set click the Save Crontab button. This would take you to a confirmation screen which will confirm that your cron job has been set. Click the Go Back link.

To go back to the Standard Cron Manager at any time , click the Standard button on the main Cron Job page. You could modify your cron, or erase it completely by simply clicking on the delete button in the Entry box. You can also set up more cron jobs. Go back to your main cPanel page by pressing the HOME link in the upper left corner.

This is the end of the article . At this point you know how to setup Cron Jobs the easy way , and after that revise them, delete them, or add additional ones. You can add as much as you want , but don't forget , Cron Jobs have the possibility to take up lots of server resources.

Now you can exit cPanel by shutting your browser, or by using the Logout button in the top right corner. Remember, if you use a public laptop or computer, Always Logout of cPanel previous to closing because of basic safety reasons.

Was this answer helpful?

« Back