---
title: "Using automated tasks on a Web Hosting plan"
description: "Find out how to configure scheduled jobs on your Web Hosting"
url: https://docs.ovhcloud.com/en/guides/web-cloud/web-hosting/cron-tasks
lang: en
lastUpdated: 2026-06-03
---
# Using automated tasks on a Web Hosting plan

## Objective

On your OVHcloud web hosting, you can use scripts to automate certain operations. A scheduled task ("cron job") runs your scripts at specific times, automatically.

**This guide explains how to create cron jobs to automate scheduled tasks on a web hosting plan.**

:::warning
OVHcloud provides services that you are responsible for with regard to their configuration and management. It is therefore your responsibility to ensure that they function properly.

This guide is designed to help you with common tasks. However, we recommend contacting a [specialist provider](https://partner.ovhcloud.com/en-gb/directory/) or reach out to the [OVHcloud community](https://community.ovhcloud.com/) if you encounter any difficulties. We will not be able to assist you. You can find more information in the [Go further](#go-further) section of this guide.
:::

## Requirements

- An [OVHcloud web hosting plan](https://www.ovhcloud.com/en-gb/web-hosting/)


***

### OVHcloud Control Panel Access

- **Direct link:** <ManagerLink to="/#/web/hosting">Hosting plans</ManagerLink>
- **Navigation path:** <code className="action">Web Cloud</code> > <code className="action">Hosting plans</code> > Select your web hosting plan

***


## Instructions

### Creating an automated task


Click on the tabs below to view each of the **5** steps.


**Step 1**

Go to the <ManagerLink to="/#/web/hosting">Hosting plans</ManagerLink> page, then select the web hosting plan concerned.
![Web Hosting](/images/assets/screens/control-panel/product-selection/web-cloud/hosting-plans.png)

**Step 2**

Click on the <code className="action">More</code> tab, then <code className="action">cron</code>. You will see an overview of your scheduled tasks and their settings.
![cron control panel](/images/assets/screens/control-panel/product-selection/web-cloud/web-hosting/cron/schedule-jobs.png)To create a cron job, click on the <code className="action">Add a scheduling</code> button on the right-hand side.


**Step 3**

Customise the task settings in the window that appears.
![adding scheduling](/images/assets/screens/control-panel/product-selection/web-cloud/web-hosting/cron/add-scheduling-step-1.png)| Option                 | Description                                                                                                                                                         |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Command to be executed | Define the path to the file containing your script. Example: www/jobs/cron.php                                                                                      |
| Language               | Select the PHP version the script is using.                                                                                                                         |
| Activation             | Choose whether the task will be active after creation or activated later.                                                                                           |
| Logs by email          | If necessary, select a contact (admin or technical) to whom a report will be sent in case of an execution error. You can also provide an alternative email address. |
| Description            | Enter a description to keep track of what your tasks do.                                                                                                            |
Click on <code className="action">Next</code>.


**Step 4**

The interface offers two modes to configure the frequency of your task:
- **Basic mode**: use the drop-down menus to specify the time of day, days of a month, week days and months for the task.
- **Expert mode**: enter numeric values as you would in a _crontab_.
| Basic mode                                                                                                                                                                                    | Expert mode                                                                                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Use the drop-down menus to specify the time of day, days of a month, week days and months for the task.                                                                                       | Enter numeric values as you would in a _crontab_. The asterisk operator denotes "every value" of the time period, meaning the task would continuously run **once an hour every day** in this example. |
| <img className="thumbnail" alt="cron frequency" src="/images/assets/screens/control-panel/product-selection/web-cloud/web-hosting/cron/add-scheduling-basic-mod-step-2.png" loading="lazy" /> | <img className="thumbnail" alt="cron frequency" src="/images/assets/screens/control-panel/product-selection/web-cloud/web-hosting/cron/add-scheduling-expert-mod-step-2.png" loading="lazy" />        |
:::info
The <code className="action">Days</code> form allows you to define execution frequencies on a monthly cycle.
The <code className="action">Days of the week</code> form allows you to define additional execution frequencies, but on a weekly cycle.
:::
You can switch between the two modes during configuration. Please also note the [limitations when scheduling a task on a web hosting plan](#limitations-of-web-hosting-tasks).
Click on <code className="action">Next</code>.


**Step 5**

The summary lists all your settings including the _crontab_ notation of the execution frequency. If everything is correct, click on <code className="action">Confirm</code>.
![cron confirmation](/images/assets/screens/control-panel/product-selection/web-cloud/web-hosting/cron/add-scheduling-step-3.png)The task will be ready within a few minutes. You can then modify all of its settings or delete the task by clicking on <code className="action">...</code> in the overview table in your OVHcloud Control Panel.



### Modify or delete a scheduled task


Click on the tabs below to view each of the **3** steps.


**Step 1**

Go to the <ManagerLink to="/#/web/hosting">Hosting plans</ManagerLink> page, then select the web hosting plan concerned.
![Web Hosting](/images/assets/screens/control-panel/product-selection/web-cloud/hosting-plans.png)

**Step 2**

On the page that pops up, click on the <code className="action">More</code> tab, then <code className="action">cron</code>.


**Step 3**

In the table that appears, click the <code className="action">...</code> button to the right of the scheduled task concerned.
Click on the <code className="action">Edit</code> or <code className="action">Delete</code> button, depending on the action you want to perform on the scheduled task.



### Limitations of web hosting tasks

| Functionality            | Description                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Hourly scheduling        | You might notice that the field for "Minutes of the hour" is disabled in the interface (set to "?" in the _crontab_ view). A task can only be executed once an hour as the highest repetition frequency and the minute of execution cannot be specified.                                                                                                                        |
| Running time             | The time limit for a task is 60 minutes. If a script exceeds this running time, it will be stopped automatically by the system.                                                                                                                                                                                                                                                 |
| Variables                | You can only define variables in a script. Adding them to the URL calling the script will not work (Example: www/jobs/cron.php?variable=value).                                                                                                                                                                                                                                 |
| Data limit               | A task can only generate up to 5 MB of data (_stdin/stderr_). For example, if a script writes data into a .txt file, the execution will be stopped automatically once the file reaches 5 MB in size.                                                                                                                                                                            |
| Scripts producing errors | If a script is faulty, it will be automatically disabled after 10 failed execution attempts. The error report will only be sent when the 10 attempts have failed.<br />Correct your script according to the error report received, then reactivate the cron task in the Control Panel (click <code className="action">...</code> then on <code className="action">Edit</code>.) |
| Execution reports        | Reports will be sent to your selected email address only once a day (during night hours).                                                                                                                                                                                                                                                                                       |

### Troubleshooting

#### Testing your script with a web browser

A simple test to see if your script will produce an error is to run it in a web browser. For example, if the file path of your script is "www/cron.php" and your hosting domain is "mypersonaldomain.ovh", you would use the URL "http://**mypersonaldomain.ovh/cron.php". If no error is showing up but the script is not performing as expected, follow up with the suggestions below.
#### Verifying the usage of absolute paths

Always make sure to use absolute paths to files in your scripts. The "DIR" constant, for example, can help to receive the current path in PHP scripts ([PHP documentation](https://www.php.net/manual/en/language.constants.predefined.php)).

#### Checking your execution logs

In your web hosting's logs, accessible from the OVHcloud Control Panel
, you will see the log category labelled "cron".
Please refer to [this guide](/en/guides/web-cloud/web-hosting/logs-and-statistics.md) for details.

##### **Example logs**

- Example of a successfully finished execution output


````
\[2026-03-30 00:36:01] ## OVH ## START - 2026-03-30 00:36:01.524384 executing: /usr/local/php7.2/bin/php /homez.161/myftpusername/www/myscript.sh
\[2026-03-30 00:36:01]
\[2026-03-30 00:36:01] ## OVH ## END - 2023-08-10 22:39:44.086166 exitcode: 0

````

- Example of a failed execution output due to exceeded execution time


````
\[2026-03-30 00:36:01] ## OVH ## START - 2026-03-30 00:36:01.524384 executing: /usr/local/php7.2/bin/php /homez.161/myftpusername/www/sleep.sh
\[2026-03-30 01:36:01] ## OVH ## ERROR - CRON TASK INTERRUPTED BY OVH - reason: your script duration exceeded the maximum permitted (3600 seconds)
\[2026-03-30 01:36:01] ## OVH ## END - 2026-03-30 01:36:01.086166 exitcode: 0

````

- Example of a failed execution output because the script file was not found in the specified path


````
\[2026-03-30 00:36:01] ## OVH ## START - 2026-03-30 00:36:01.524384 executing: /usr/local/php7.2/bin/php /homez.161/myftpusername/www/noscript.sh
\[2026-03-30 00:36:01] ## OVH ## ERROR command '/homez.161/myftpusername/www/noscript.sh' not found
\[2026-03-30 00:36:01] ## OVH ## END - 2026-03-30 00:36:01.086166 exitcode: 255

````

- Example of a failed execution output because of a permissions error (chmod) or incorrect configuration of the .ovhconfig file


````
\[2026-03-30 18:07:10] ## OVH ## Your job could not be initiated for an unknown reason.
\[2026-03-30 18:07:10]
\[2026-03-30 18:07:10] ## OVH ## END - 2026-03-30 18:07:10.969840 exitcode: 255

````

## Go further [](#)
[Configuring the .ovhconfig file of your Web Hosting plan](/en/guides/web-cloud/web-hosting/configure-your-web-hosting.md)

[Using SSH on a Web Hosting plan](/en/guides/web-cloud/web-hosting/ssh-on-webhosting.md)

For specialised services (SEO, development, etc.), contact [OVHcloud partners](https://partner.ovhcloud.com/en-gb/directory/).

If you would like assistance using and configuring your OVHcloud solutions, please refer to our [support offers](https://www.ovhcloud.com/en-gb/support-levels/).

Join our [community of users](https://community.ovhcloud.com/).
