MS Scheduler - PROCEED-Labs/proceed GitHub Wiki

The PROCEED Management System has a Scheduler to trigger actions (we call them "Scheduling Tasks") repeatedly. For example, to delete all created Guest Accounts after a while of non-activity.

Since we target two deployment environments - cloud and self-hosted - we use different Scheduler implementations. In the cloud, we use the pre-existing scheduler of the cloud provider which triggers the Scheduling Tasks via a REST call. For the self-hosted deployment, we use our own scheduler based on the cron lib which calls the Scheduling Tasks internally.

image

Configuring the Schedulers

(Also see the env var configuration wiki page for more details about the configuration.)

Until now, it is sufficient that the Scheduler runs only once a day (default: 3am) which triggers all Scheduling Tasks inside the MS. The scheduler is configured differently for the cloud and the self-hosted deployment.

For the self-hosted deployment, we use the Management Systems environment variable SCHEDULER_INTERNAL_ACTIVE = true to active the internal Scheduler, which runs at the configured time set with the env variable SCHEDULER_INTERNAL_INTERVAL (default: "0 3 * * *").

In the cloud, the Management Systems environment variable SCHEDULER_INTERNAL_ACTIVE must be set to false. A security token should be set in the env var SCHEDULER_SECURITY_TOKEN, so that the cloud scheduler can call HTTP POST /scheduler/tasks/all with the header field X-PROCEED-SCHEDULER-SECURITY-TOKEN: <token>. Then, we use the UI interfaces of the cloud provider to set the scheduler interval.

image

image

Scheduling Tasks

See the env var configuration wiki page, since every task has an environment variable which sets the default time.

⚠️ **GitHub.com Fallback** ⚠️