Cron Jobs is an application that allows you to automatically schedule routine tasks in your website. Tasks such as deleting old files or forwarding a contact list can be automated to run on a preset schedule. The downside to Cron Jobs is that you need some coding knowledge in order to use the application; however, if you know how to code in Linux, you can set up tasks easily with Cron Jobs.

Cron Jobs is mainly used to modify the files or databases within your site. In order to use the Cron Jobs application on cPanel, you need to first pick a command (task) that you want to run and write the code for it. For example, if your website has a contact form, you can send yourself an updated list of all the submitted contact forms at the end of each week. Once you write the code (or program/script) that retrieves the contact forms from your website, you need to upload that code to your site from File Manager in your cPanel. Once that piece of code is uploaded to your directory, you can follow the below instructions to set up your Cron Job.

1. From your cPanel in the Advanced section, click Cron Jobs.
musites_cron_jobs
 

2. A form appears. Confirm your email address is correct. To update it, type your email address in the text box, and then click Update Email.
3. Choose a time increment from the Common Settings list. The time increment sets how frequently the Cron Job runs. You can run a Cron Job daily, weekly, or monthly; however, we recommend that the maximum time you run a Cron Job is every 15 minutes.
4. Type the file path in the Command text box. This path should link to your file containing the code, which you uploaded to your website through File Manager. Additional material with common commands is available online.
5. Click Add New Cron Job, when finished.
musites_add_new_cron_job
 

Monitor your processes the first couple times they are running to ensure they are running efficiently. If the Cron Job takes too long, you should optimize your script so that it doesn’t require as many system resources. Setting a Cron Job to run too frequently, or running a Cron Job that doesn’t have correctly declared options can degrade server performance.
« --- »

About The Author

Leave a Reply

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