# How to create Scheduled Tasks (Cron Jobs) in cPanel?

To create a scheduled task, access your control panel and then, in the **Advanced** section, go to **Cron Jobs**.

<figure><img src="https://content.gitbook.com/content/Ofi0Qrfm7RZh6yIwbvAQ/blobs/131zmTw3MT95aeN4i93N/CronJobsCpanel01.png" alt=""><figcaption></figcaption></figure>

The **Cron Jobs** screen has several sections. First, it will ask you for an optional email address where you want to receive the execution report of the scheduled task. If you do not configure an email address, the server will send the report to the default email address generated by cPanel.

<figure><img src="https://content.gitbook.com/content/Ofi0Qrfm7RZh6yIwbvAQ/blobs/bBS5F8aBkseSO8Y0mLHu/CronJobsCpanel02.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you want to learn more about the default email address created by cPanel, you can access this link: [Catch All Mailbox](https://help.sitioshispanos.com/menu-principal/guias/correo-electronico/herramientas-y-opciones-de-correo-utiles/administrar-casilla-catch-all).
{% endhint %}

In the second section, you will see sample information to create the command of the task that will be executed. It is very important to pay attention to these examples. Let's go over each point:

<figure><img src="https://content.gitbook.com/content/Ofi0Qrfm7RZh6yIwbvAQ/blobs/gxD1unMS9x10euvVZWou/CronJobsCpanel03.png" alt=""><figcaption></figcaption></figure>

1. The example indicates that, according to your PHP version, you should write the command `/usr/local/bin/ea-php99` according to the PHP version number you have. If your account uses PHP 8.0, you should write: `/usr/local/bin/ea-php80`

{% hint style="info" %}
You can find out which PHP version your account is using by accessing **MultiPHP Manager** in the control panel.
{% endhint %}

2. In this section, you must define how often your scheduled task will run. You can complete this by selecting options from each dropdown menu.
3. Finally, you will see the box where you should write the command to execute the scheduled task. This is where you should write the command `/usr/local/bin/ea-php` mentioned in point 1.

* An example would be: `/usr/local/bin/ea-php80 /home/mycPanelUser/public_html/myscript.php`

The last section of **Cron Jobs** will display all the scheduled tasks you have created. You can edit or delete a task that has already been created.

<figure><img src="https://content.gitbook.com/content/Ofi0Qrfm7RZh6yIwbvAQ/blobs/a1dRzb7wlULW0zHR1xVY/CronJobsCpanel04.png" alt=""><figcaption></figcaption></figure>
