> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.serverfreak.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How To Schedule Tasks With Cronjobs In cPanel

Cronjobs are scheduled tasks used to automate the server administration process.

If you need to perform a task after say 5 hours, you just have to add a Cronjob for it.

cPanel provides a very easy interface for adding cronjobs. 

You can access cronjobs via **cPanel** >> **Advanced** >> **Cron Jobs**.


1) Login to cPanel. Under the Advanced section, click on **Cron Jobs**.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/9b4e62dc-faed-4618-a209-5edb2fb1f73b.png)


2) To setup a cron job:

**Common Settings** – commonly used time and date interval. The cPanel will give suggestions on what cron job you may want to use.


![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/8519bc46-d1f9-4d6e-9971-5f9208a35158.png)


**Minute** –  This drop-down menu allows you to select the number of minutes between running the cron job, or the minute each hour on which you wish to run the cron job.
**Hour** – This drop-down menu allows you to select the number of hours between running the cron job, or the hour each day on which you wish to run the cron job.
**Day** – This drop-down menu allows you to select the number of days between running the cron job, or the day of the month on which you wish to run the cron job.
**Month** – This drop-down menu allows you to select the number of months between running the cron job, or the month of the year in which you wish to run the cron job.
**Weekday** – This drop-down menu allows you to select the day(s) of the week on which you wish to run the cron job.
**Command:** Command to be executed. eg: 

**/usr/bin/php  /home/yourusername/public_html/testscript.php**

Note: If you do not wish to receive an email notification of a specific cron job, add the following
line to the command: **>/dev/null 2>&1**


3) Click **Add New Cron Job** button to save the changes.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/59ffd207-4db4-43b1-bb3e-93f6da21b055.png)