---
title: "Breaking: #110637 - Scheduler repository throws InvalidTaskException"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:breaking-110637-1788640608"
source: "Changelog/15.0/Breaking-110637-SchedulerRepositoryThrowsInvalidTaskException.rst"
typo3-version: "15.0"
typo3-major: 15
type: "breaking"
issue: 110637
forge: "https://forge.typo3.org/issues/110637"
tags: ["CLI", "PHP-API", "NotScanned", "ext:scheduler"]
rendered: "2026-10-07T19:18:07+00:00"
---

# Breaking: #110637 - Scheduler repository throws InvalidTaskException {#breaking-110637-1788640608}

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

## Description {#description}

The `\TYPO3\CMS\Scheduler\Domain\Repository\SchedulerTaskRepository::findByUid()` and
`\TYPO3\CMS\Scheduler\Domain\Repository\SchedulerTaskRepository::findNextExecutableTask()` methods now throw
`\TYPO3\CMS\Scheduler\Exception\InvalidTaskException` when a Scheduler
task cannot be deserialized or is otherwise invalid. Previously, the global
`\UnexpectedValueException` was thrown.

## Impact {#impact}

Code that catches `\UnexpectedValueException` when retrieving invalid
Scheduler tasks will no longer catch the exception.

## Affected installations {#affected-installations}

Installations are affected when custom extension code directly uses
`\TYPO3\CMS\Scheduler\Domain\Repository\SchedulerTaskRepository` and handles invalid tasks by catching
`\UnexpectedValueException`.

## Migration {#migration}

Catch `\TYPO3\CMS\Scheduler\Exception\InvalidTaskException` instead of `\UnexpectedValueException`.

Before:

```php
try {
    $task = $schedulerTaskRepository->findByUid($taskUid);
} catch (\UnexpectedValueException) {
    // Handle the invalid task.
}
```

After:

```php
use TYPO3\CMS\Scheduler\Exception\InvalidTaskException;

try {
    $task = $schedulerTaskRepository->findByUid($taskUid);
} catch (InvalidTaskException) {
    // Handle the invalid task.
}
```

Apply the same change when calling `findNextExecutableTask()`.
