---
title: "Feature: #107151 - Add AsNonSchedulableCommand attribute for CLI commands"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-107151-1763044849"
source: "Changelog/14.0/Feature-107151-AddAsNonSchedulableCommandAttribute.rst"
modified: "2026-09-15T10:46:36+00:00"
---

# Feature: #107151 - Add AsNonSchedulableCommand attribute for CLI commands

See [forge#107151](https://forge.typo3.org/issues/107151)

## Description

With [forge#101567](https://forge.typo3.org/issues/101567) the usage of Symfony's `#[AsCommand]` attribute
has been introduced, which allows configuring a Symfony CLI command
with a corresponding name, description and further options.

It however lacked TYPO3's custom implementation of the `schedulable`
option, which allows flagging a CLI command to be not allowed to be
scheduled via the **Administration > Scheduler** backend module.

> [!NOTE]
> The top-level backend modules were renamed in TYPO3 v14.
> The module now called **Administration** was formerly named
> **System**, and the module now called **System** was formerly
> named **Admin Tools**.
>
> For details, see:
> [Feature: #107628 – Improved backend module naming and structure](https://docs.typo3.org/permalink/changelog:feature-107628-1729026000).

This previously required tagging such a command with the
`schedulable: false` tag attribute in the `Services.yaml` or
`Services.php` definition.

For this, the PHP attribute
`AsNonSchedulableCommand` has been
introduced. Any Symfony Command can use this empty attribute. The automatic
Scheduler registry will ignore any command with this tag.

By default, a Symfony Command remains schedulable using the regular Symfony
attribute. To prevent redundancy, the new attribute
`#[AsNonSchedulableCommand]` should be used only on top of that.

Another advantage is that an IDE like PhpStorm is capable of showing all
usages of that attribute inside a project.

## Impact

Developers can now fully embrace using the Symfony `#[AsCommand]`
attribute and still be able to declare a non-schedulable execution within
the scope of the same class, without any service registration.

This is achieved by using the `#[AsNonSchedulableCommand]` in addition
to the `#[AsCommand]` attribute.

## Example

```php
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use TYPO3\CMS\Core\Attribute\AsNonSchedulableCommand;

#[AsCommand('myextension:import', 'Import data from external source')]
#[AsNonSchedulableCommand]
final class ImportCommand extends Command
{
    // ...
}
```
