---
title: "Task files"
manual: "Scheduler as Code"
version: "main"
permalink: "https://docs.typo3.org/permalink/maikschneider/scheduler-as-code:task-files@main"
source: "Configuration/TaskFiles.rst"
rendered: "2026-10-06T08:46:59+00:00"
---

# Task files {#task-files}

Each task is one YAML file in `config/scheduler/`. The file name, without
the `.yaml` or `.yml` extension, is the task's **identifier**. It
links the file to its database record and may only contain lowercase letters,
digits, `-` and `_`.

**config/scheduler/cleanup-deleted.yaml**

```yaml
type: 'cleanup:deletedrecords'
description: 'Remove deleted records older than 30 days'
group: 'Maintenance'
execution:
  frequency: '0 3 * * *'
parameters:
  options:
    min-age: 30
```

## Reference {#task-files-reference}

-   **type**

    -   *Type:* string
    -   *Required:* true

    A schedulable console command, such as `cleanup:deletedrecords`, or a
    scheduler task class, such as
    `TYPO3\CMS\Scheduler\Task\OptimizeDatabaseTableTask`.

-   **description**

    -   *Type:* string

    Shown in the Scheduler module.

-   **group**

    -   *Type:* string

    Name of the task group. A group that does not exist yet is created.

-   **disabled**

    -   *Type:* bool
    -   *Default:* false

    Set to `true` to import the task disabled.

-   **priority**

    -   *Type:* int
    -   *Default:* 100

    `50` (low), `100` (regular) or `150` (high). Only TYPO3 14 knows
    task priorities; TYPO3 13 ignores the key.

-   **execution**

    -   *Type:* array
    -   *Required:* true

    When the task runs. Needs [execution.frequency](https://docs.typo3.org/permalink/maikschneider/scheduler-as-code:confval-task-file-execution-frequency@main), or
    [execution.start](https://docs.typo3.org/permalink/maikschneider/scheduler-as-code:confval-task-file-execution-start@main) for a task that runs once.

-   **execution.frequency**

    -   *Type:* string or int

    A cron expression such as `'0 3 * * *'`, or an interval in seconds
    such as `3600`. Without a frequency, the task runs once at
    [execution.start](https://docs.typo3.org/permalink/maikschneider/scheduler-as-code:confval-task-file-execution-start@main).

-   **execution.start**

    -   *Type:* string or int

    The first run, as a date or a Unix timestamp. Optional for recurring
    tasks: they then start counting from the import. Required for tasks
    without frequency.

-   **execution.end**

    -   *Type:* string or int

    The last run. A task past its end is imported disabled.

-   **execution.multiple**

    -   *Type:* bool
    -   *Default:* false

    Set to `true` to allow several executions of the task at the same time.

-   **parameters**

    -   *Type:* array

    The task's own settings, see [Task parameters](https://docs.typo3.org/permalink/maikschneider/scheduler-as-code:task-parameters@main).

Dates accept every format PHP's `DateTimeImmutable` understands, for example
`'2026-01-01 04:00'`. They are read in the server's time zone.

## Examples {#task-files-examples}

**An interval task that may run in parallel**

```yaml
type: 'language:update'
description: 'Update language packs hourly'
priority: 150
execution:
  frequency: 3600
  multiple: true
parameters:
  options:
    fail-on-warnings: true
```

**A task that runs once**

```yaml
type: 'cleanup:orphanrecords'
execution:
  start: '2026-12-24 22:00'
```
