Usage
Exporting existing tasks
Start by exporting the tasks you already have. Every task that is not linked to a
file yet is written to config/:
vendor/bin/typo3 scheduler:export
git add config/scheduler
Exported tasks are linked to their file right away, so the next import finds them unchanged.
| Command | Effect |
|---|---|
scheduler: | Export all tasks that are not linked to a file yet. |
scheduler: | Export the tasks with uid 3 and 7. |
scheduler: | Export task 3 to config/. |
scheduler: | Also re-export tasks that are already linked, overwriting their files. |
Without
--, the file name is derived from the task type, for
example cleanup- for the console command
cleanup:.
Working with task files
From now on, change tasks in their files, not in the backend. The import picks up every change, see Deployment for when exactly it runs.
| Change | Effect on the task |
|---|---|
| New file | A task is created. |
| Changed file | The task is updated. Its run history is kept. |
| Removed file | The task is disabled and marked File removed. It is not deleted, so its history stays available. |
| Restored file | The task is enabled and updated again. |
| Renamed file | The file name is the task's identifier. A renamed file creates a new task and disables the old one. |
| Task deleted in the backend | The task comes back on the next import while its file exists. |
The file format is described in Task files.
Badges in the Scheduler module
The task list in System > Scheduler marks tasks that are linked to a file. Hover a badge to see the file.
- Managed in file
- The task is imported from a task file.
- Out of sync
-
The task was changed in the database since its last import or export, for example in the backend. The change is kept until the task file changes; the next import then overwrites it. To keep the change, write it to the file:
vendor/bin/typo3 scheduler:export <uid> --forceCopied!Running a task does not count as a change, and neither does the scheduler disabling a single-run task after its run.
- File removed
- The task file no longer exists, so the task was disabled. Delete the task, or restore the file to import it again.