How to setup a cron job in cPanel

Now let's learn how to setup a cron job

1. Click the Cron Jobs icon

 

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

 

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

 

 

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

 

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.

 

6. When ready, click Add New Cron Job

 

The cron job has been set as you can see here.

  • 0 Users Found This Useful
Was this answer helpful?