# Scheduled tasks

A scheduled task event is one run of one entry in your schedule: what ran, how long it took, and how it ended.

![The Scheduled tasks page in the panel: each task with its expression, its last run, its runs and failures over the day, and its average](/images/docs/scheduled-tasks.png)

## Turning it on

```env .env
LB_TRACK_SCHEDULED_TASKS=true
```

Then accept **Scheduled tasks** on the application.

This needs the scheduler itself to be running, which is the one line of cron Laravel asks for:

```bash crontab
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
```

## What is recorded

| Field | What it is |
| --- | --- |
| Task | The command, or the description of a closure. |
| Expression | The cron expression it is scheduled on. |
| Status | Finished, failed or skipped. |
| Duration | How long the run took. |
| Without overlapping | Whether the task is guarded against running twice. |
| Host | Which machine ran it, which matters when more than one could have. |

A skipped run is a run: a task guarded by `withoutOverlapping` that skips every minute for an hour is a task whose previous run never finished.

## The task that stopped

The point of recording a schedule is not the run you can see. It is the run you cannot: a task that quietly stopped firing looks exactly like a task nobody has looked at. In the panel, a task that has missed its window is flagged against its own expression rather than against a threshold you have to pick.

## Commands and the schedule

A scheduled command fires Laravel's command events too. It is counted once, against the schedule, not twice. [Commands](/docs/telemetry/commands) covers the runs that are not scheduled.

## Batching

`schedule.batch_size` is twenty, `schedule.max_retries` is two. A scheduler that runs every minute rarely fills a batch, so most runs are sent as they finish.