# Scheduled tasks

> Run a command at a set time (an export, a clean-up, sending emails): the frequency and the cron expression.

Source: https://docs.fransys.cloud/en/projets/taches-planifiees/ Checked against the console on 2026-10-23.

## Add a task

In an application's panel, **Scheduled tasks** tab, click **Add a scheduled task**:
- **Command**: what will run, inside the service's container (for example `php artisan reports:send` or `node scripts/cleanup.js`);
- **Schedule**: when;
- **Enabled**: untick it to pause the task without deleting it.

The task applies at the project's next deployment.

## Choose the frequency

- **Every day**, with the **Execution time**;
- **Every week**, with the **Day of the week** and the time;
- **Every month**, with the **Day of the month** and the time;
- **Custom**: a cron expression.

The console always turns the schedule into a sentence, for example “This task will run every Monday at 03:00.” Read it before saving.

## The cron expression

Five fields separated by spaces, in this order: **Minute**, **Hour**, **Day of month**, **Month**, **Day of week** (0 or 7 = Sunday).

| Expression | What the console says |
|---|---|
| `0 3 * * *` | every day at 03:00 |
| `*/15 * * * *` | every 15 minutes |
| `30 8 * * 1-5` | at 08:30, Monday through Friday |
| `0 0 1 * *` | on the 1st of every month at 00:00 |

A day of the month after the 28th skips the months that are too short: the console points it out.

## With your agent

Your agent can add a scheduled task in a plan. For example, ask it: “Add a task that runs `php artisan backup:clean` every night at 2 a.m. and prepare the plan.”
