How to setup a cron job in cPanel

This demo assumes you've already logged in to cPanel

Now let's learn how to setup a cron job

1) Click the Cron Jobs icon

http://hostnit.com/images/support/cron%20job/1.png

2) Enter the email address where you want the cron job results sent after each time it runs

http://hostnit.com/images/support/cron%20job/2.png

3) Now you have to define exactly when and how often you want the cron job to run. This is made easier by using one of the pre-defined or common settings

http://hostnit.com/images/support/cron%20job/3.png

Notice that by choosing a common setting, all fields are filled in automatically. This also helps you understand what each field means

http://hostnit.com/images/support/cron%20job/4.png

If you have a shared hosting account, crons should not be made more regular than once every 10 minutes.

 

4) Let's choose Once a week

http://hostnit.com/images/support/cron%20job/5.png

5) Next, enter the command of the script you want to run, including the path (from root). If you are on shared hosting - add nice -n 15 to the start. This ensures that the server gives the cron a lower priority than critical system processes, helping maintain stability and server uptime.

Remember to add "nice -n 15" to the start of your command!

http://hostnit.com/images/support/cron%20job/6.png

6) When ready, click Add New Cron Job

http://hostnit.com/images/support/cron%20job/7.png

That's it! The cron job has been set as you can see here. You can create additional cron jobs, and edit or delete existing ones

http://hostnit.com/images/support/cron%20job/8.png


-------
Article Posted By: Tyler D. of Host NIT., Inc
hostnit.com
cpanelhosting.com

 

Host NIT., INC is a registered cooperation with its main HQ in Florida and Data-Center in Secaucus, NJ.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What is Fantastico?

Fantastico De Luxeis the leading auto installer for cPanel servers. With more than 10,000...

How do I change my cPanel username?

Changing your server username is possible, but you should be aware of the following: Your...

How to add an MX entry in cPanel

This demo assumes you've already logged in to cPanel Now let's learn how to setup MX entries 1)...

How to backup your website in cPanel

This demo assumes you've already logged in to cPanel Now let's learn how to backup our website...

How to change the primary language in cPanel

This demo assumes you've already logged in to cPanel Now let's learn how to change the primary...