Executor control

From Dafne documentation
Jump to navigation Jump to search

The executor is the component that plans scenarios and runs tasks. Its status is shown on the button in the Monitor console filter bar, which also carries the available actions. The actions require the Admin role.

These actions affect everything the executor is doing. To suspend a single run, pause that processing instead; see Controlling a processing.

Status and available actions

Executor statuses and transitions
Status Meaning Available actions
Running Normal operation. Scenarios are planned and tasks executed. Pause, Stop
Paused No new scenarios are planned and no new tasks are started. Running tasks continue. Resume, Stop
Stopping A stop has been requested. The executor waits for running tasks to finish. —
Stopped Not running. The status button is disabled. —
Killing A forced stop is in progress. —

Pause

Pause suspends planning and execution. No new scenario is planned and no new task is started. Tasks already running are left to finish.

Use it when:

  • a target system needs to be taken out of service and you want the current tasks to complete first
  • a configuration problem is affecting many tasks and you want to stop the damage spreading while you fix it
  • maintenance has to be carried out and a clean stop is preferable to cancelling work in progress

Pausing is almost always the right first response to a widespread problem. It stops new work without discarding what is already under way.

Resume returns the executor to normal operation.

While paused, the action menu on individual tasks reports Scheduler stopped and the task actions are disabled.

Stop

Stop shuts the executor service down. Before stopping for real, it waits for running tasks to finish.

The important operational point: the executor is not restarted automatically. Whether it comes back depends entirely on how the installation is set up — a container platform configured to restart it will do so, a plain service installation will not. Confirm how your environment behaves before stopping the executor, particularly outside working hours.

Because a stop waits for running tasks, a long-running task will delay it. The executor stays in Stopping status until that task completes.

Starting the executor

The executor cannot be started from the GUI. The status menu offers only Pause, Stop and Resume; starting is an infrastructure operation.

The executor is a long-running service — typically a system service or a container. How it is started, and whether it restarts by itself, depends on how your installation is deployed. Establish this before you stop it.

This differs from the previous version of the product, which could stop itself when idle and be restarted by an operating system scheduler. Dafne has no equivalent: the StopIdle setting and the GUI's Start server action no longer exist. The executor is expected to stay running.

Whether an executor is running is detected through its database process name, configured as dafne.executor-db-process-name. See Application configuration.


Executor messages

The warning button beside the status shows the number of error and warning messages the executor has produced. These come from the executor itself rather than from individual tasks, and are the place to look when a whole scenario fails to plan.

Each message shows its severity, text and timestamp. Administrators can mark a single message Resolved or clear them all with Remove all. The button is hidden when there are no messages.

Clear messages once they have been dealt with. A list that is never cleared stops being a useful signal.

Choosing between the options

Situation Action
One run needs to stop; everything else should continue Pause that processing
Nothing new should start, but current work should finish Pause the executor
The service must be shut down Stop — confirm first how it will be restarted
One task must not run Hold that task

See also