Table of Contents

Task Scheduler

Introduction

The Task Scheduler is an independent cluster responsible for executing scheduled tasks. It is a single-tenant cluster that is responsible for triggering scheduled tasks for all clusters and tenants.

For these reasons, this cluster should never be made available to an end user (such as the Tenant Management). Its graphical interface should be seen as an administration console.

If you want to provide access to consultation or modification of scheduled tasks from a business cluster, you can reference the TaskSchedulerClient module and use what it provides to communicate with the Task Scheduler cluster.

Only background server methods can be scheduled. Therefore, it is always the Task Runner service of the business cluster that will execute the scheduled tasks. The Task Scheduler cluster only plays the role of an orchestrator.

For more information:

Getting started in development mode

In development mode, you first need to install the Task Scheduler cluster:

neos install-cluster TaskScheduler

You then need to configure the persistence of the Task Scheduler cluster.

This configuration should be added in the cluster configuration. For example, in a <mycluster>.task-scheduler.yml file :

TaskScheduler:
  DatabaseType: PostgreSql # (required) The database type.
  ConnectionString: Server=localhost;Port=5432;Database=TaskScheduler;User Id=xxxx;Password=xxxx; # (required) The connection string
  DefaultUserAccountLogin: # (optional) The login of the user account that will be created during database migration. This is not necessary if you have set the `UserPermissions__DefaultUserAccountLogin` environment variable.

Once the configuration is set up, you can start your cluster by specifying the option --task-scheduler (or -ts which will also start the Task Scheduler cluster).

neos run -ts

How to view and schedule tasks from a business cluster?

To interact with the Task Scheduler cluster from a business cluster, it is recommended to integrate the TaskSchedulerClient module.