Scheduler
This document gives a minimum base to start with the AWE Scheduler module, and explains how to automate and schedule tasks inside AWE in a simple way.
The Scheduler module is based on the Quartz Scheduler library.
All documentation related to the Quartz Scheduler library can be found on its web page.
Prerequisitesβ
The scheduler module needs to be configure before it is used.
To see how to configure the scheduler module for your application see the Configuration guide.
Remote scheduler setupβ
You can split the scheduler into a dedicated AWE instance and have your main AWE application delegate scheduling to it.
1. Configure the scheduler instanceβ
On the dedicated scheduler node, enable scheduler-only mode and configure the callback to your main AWE app:
# Scheduler-only instance
awe.scheduler.scheduler-instance=true
# Callback to the main AWE instance
awe.scheduler.remote-callback-url=http://localhost:8080
awe.scheduler.remote-callback-secure-enabled=true
awe.scheduler.remote-callback-user=scheduler
awe.scheduler.remote-callback-password=ENC(yourEncryptedPassword)
2. Configure the main AWE instanceβ
On the main AWE app, enable remote scheduler usage and point to the scheduler base API URL:
awe.scheduler.remote-enabled=true
awe.scheduler.remote-scheduler-url=http://localhost:8090/scheduler/api/v1
Note: The remote scheduler base URL must target the scheduler instance API (default:
/scheduler/api/v1).
The scheduler instance now answers /scheduler/api/** only to requests with an AWE bearer token, and the scheduler instance needs the AWE REST starter to validate it. The main AWE instance must therefore log in with a user of the scheduler instance, configured in awe.scheduler.remote-scheduler-user and awe.scheduler.remote-scheduler-password. See Scheduler API security.
Tasksβ
A task consists on a job associated to a trigger that is executed by the Scheduler in the configured time / moment.
A task can also be concatenated with other tasks to create a workflow. This can be done by adding those other tasks as dependencies in the parent task configuration wizard.
Typesβ
There are two type of tasks that the scheduler can work with, the maintain tasks and the command tasks.
| Maintain Task | Command Task |
|---|---|
| A maintain task executes a public maintain with a defined schedule. | A command task runs a shell command with a defined schedule, either on the local AWE host or on a remote host over SSH. |
Command execution: local and remoteβ
A command task runs the value entered in the Command field as a shell command. The Execution path, when set, is used as the working directory the command runs in, and it also acts as a fallback location for the command itself: the command is looked up on the host PATH first, and only when the PATH does not provide it is an executable file of that name inside the execution path used. A script living in the execution path therefore runs by its bare name, while a system command such as ls or python always keeps resolving from the PATH and is never shadowed by a file of the same name in the execution path. A command already containing a path separator (./my-script.sh, or an absolute path) is used exactly as written.
- Local execution (default): when Run on remote server is left unchecked, the command runs on the AWE host itself.
- Remote execution over SSH: when Run on remote server is checked, a Remote server must be selected. The command is executed on that host through an SSH exec channel, and both its standard output and standard error are captured into the task execution log.
Remote command execution requires the selected server to use the ssh connection type. Authentication is done with the server user together with either a password, a private key (optionally passphrase-protected), or both. See Servers for how to configure them, and the Configuration guide for the SSH host-key verification options.
Deferred executionsβ
A maintain task can finish later. This is for work that another system completes after the maintain returns, and that you do not want to hold a scheduler thread for. The maintain answers that it accepted the work, the execution stays running without holding any thread, and the other system (or your own code) completes the execution when the work ends.
- The scheduler launches the maintain, which starts the work in the other system and answers deferred.
- The scheduler releases its thread. The execution stays running and its dependencies are not launched.
- When the work ends, whoever finished it completes the execution with its final status (see Completing the execution).
- The task dependencies are launched with the usual rules (
Launch dependencies in case of warning/in case of error).
The deferred answerβ
A maintain answers deferred when its last step is a service that returns SchedulerDeferred.accepted(externalReference, description):
public ServiceData startExternalWork(Integer taskId, Integer executionId) {
// Start the work and hand the execution key to the system that will complete it
String reference = externalSystem.start(taskId, executionId);
return SchedulerDeferred.accepted(reference, "Waiting for the external system");
}
<!-- Services.xml -->
<service id="startExternalWork">
<java classname="com.example.ExternalWorkService" method="startExternalWork">
<service-parameter name="taskId" type="INTEGER"/>
<service-parameter name="executionId" type="INTEGER"/>
</java>
</service>
<!-- Maintain.xml -->
<target name="startExternalWork">
<serve service="startExternalWork">
<variable id="taskId" type="INTEGER" name="taskId"/>
<variable id="executionId" type="INTEGER" name="executionId"/>
</serve>
</target>
Then create a maintain task that executes the startExternalWork maintain.
- The deferred answer must be the answer of the last step of the maintain.
- It works the same when the scheduler runs as an external application: the answer travels back to the scheduler instance with the answer of the maintain call.
externalReferenceis an optional reference of the work in the other system, stored with the execution. It is cut to 256 characters.descriptionis optional. It is shown as the description of the execution while it waits, and it is cut to 2000 characters.
The execution keyβ
The scheduler gives every maintain two reserved parameters: taskId and executionId. Declare variables with those names in the maintain target, as in the example above, to receive them. They identify the execution, so the maintain must hand them to whoever will complete it. They take priority over a task parameter with the same name.
While the execution waitsβ
- The execution is stored as running with the description of the deferred answer.
- The task dependencies are not launched and the task is shown as running in the tasks screen.
- No scheduler thread is held.
Completing the executionβ
The system that finishes the work calls the scheduler API (on the scheduler instance when you use a remote scheduler):
POST /scheduler/api/v1/tasks/{taskId}/executions/{executionId}/complete
The request needs an AWE bearer token, like the rest of /scheduler/api/** (see Scheduler API security). The body is a JSON object:
| Field | Description | Required |
|---|---|---|
status | Final status: OK, WARNING, ERROR, STOPPED, INTERRUPTED or INFO (case insensitive) | Required |
description | Description of the execution, 2000 characters at most | Optional |
outputs | Object with text values for the dependencies (see Outputs) | Optional |
curl -X POST "https://scheduler.example.com/scheduler/api/v1/tasks/12/executions/340/complete" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"status": "OK", "description": "Calculation finished"}'
| Response | Meaning |
|---|---|
| 200 | The execution was completed. The body is {"taskId": 12, "executionId": 340, "status": "JOB_OK"} |
| 400 | The status is missing or is not one of the allowed values, or the description is longer than 2000 characters |
| 401 | The request has no valid bearer token |
| 404 | The execution does not exist |
| 409 | The execution cannot be completed. The body is {"type": "...", "currentStatus": "JOB_OK"}, with one of the types below |
409 type | Meaning |
|---|---|
execution-not-running | The execution was already completed, interrupted by its deadline or stopped. currentStatus is the status it has |
execution-not-deferred | The execution is not registered as deferred, so it cannot be completed from outside. With currentStatus JOB_RUNNING the maintain may not have answered yet: retry shortly if you expect it to be deferred |
A 409 with execution-not-running is final: the execution is already closed and repeating the call will not change it, so do not retry it.
The status decides what happens to the dependencies, with the usual rules: they are launched after OK, after WARNING only with Launch dependencies in case of warning, after ERROR only with Launch dependencies in case of error, and never after STOPPED, INTERRUPTED or INFO. The scheduler closes the execution once, writes its end, sends the task report and launches the dependencies; any other completion of the same execution does nothing.
Code that runs in the same application as the scheduler can complete the execution without the API, with the SchedulerExecutionCompletionService bean:
CompletionResult result = completionService.complete(taskId, executionId, TaskStatus.JOB_OK,
"Calculation finished", null);
// result.outcome(): CLOSED, NOT_RUNNING, NOT_DEFERRED or UNKNOWN
Outputsβ
The outputs of the completion reach the dependencies launched when the execution closes, as the other values of the parent task do: each dependency takes the value of every output whose name matches one of its variable parameters. An output replaces a parameter of the closed task with the same name, and an output without a name or a value is ignored.
curl -X POST "https://scheduler.example.com/scheduler/api/v1/tasks/12/executions/340/complete" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"status": "OK", "outputs": {"resultFile": "/data/out/340.csv"}}'
A dependency with a variable parameter resultFile runs with /data/out/340.csv.
Deadline, stop and restartβ
- Deadline: an execution that is not completed within the task Timeout, or within
awe.scheduler.deferred.default-timeout(24 hours by default) when the task has none, counted from the start of the execution, ends as interrupted with the timeout message and its dependencies are not launched. The scheduler checks the deadlines everyawe.scheduler.deferred.timeout-check-interval(60 seconds by default), so the execution can end after its deadline by up to that interval. A completion that arrives later gets a409. See the Configuration guide. - Stop: the Stop button of the tasks screen ends the waiting executions of the selected task as stopped, without launching dependencies.
- Restart and cluster: the state of a waiting execution is stored in the database, so it survives a restart. At startup the scheduler interrupts the executions that a stopped node left running, except the ones that are waiting to be completed. Every node checks the deadlines and any node can receive the completion, but only the first call that closes an execution ends it.
Cancellation noticeβ
When a user stops a deferred execution or its deadline passes, the other system may still be working on it. Fill Cancellation maintain in the task (maintain tasks only) to tell it: the call that closes the execution launches that maintain once, where the task maintain runs (on the AWE application for an external scheduler), with these parameters:
| Parameter | Value |
|---|---|
taskId | Task identifier |
executionId | Execution identifier |
externalReference | The externalReference of the deferred answer |
A completion through the API or the SchedulerExecutionCompletionService does not send it: the other system closed the execution itself. The notice never reopens or blocks the execution: when the maintain fails or answers an error, the execution stays closed and the failure is stored in its trace.
Trace and countersβ
Every deferred execution keeps, after it closes, who closed it and when (API, DEADLINE or USER) and the outcome of its cancellation notice (SENT, or FAILED with the error message). The execution details of the tasks screen show the reference, the deadline and this trace. The scheduler dashboard shows four counters: deferred executions running, completed by the other system, interrupted by the deadline and stopped by a user.
Task execution databaseβ
A maintain task runs against the datasource configured through Spring Boot's spring.datasource.* properties. This is the case in both execution modes:
- Local (embedded) scheduler β the maintain runs on the same datasource as the main AWE application.
- Remote scheduler instance β the maintain runs on the datasource configured for that scheduler instance.
Scheduler tasks run on a Quartz worker thread with no bound HTTP session. The interactive multi-database routing that a normal web request relies on reads its target from session/screen state, which simply does not exist here. The scheduler therefore resolves the connection from the configured spring.datasource instead of any session value.
There is no per-task switch to "run this task on the main application's database". A remote scheduler instance uses its own spring.datasource. To make it target the same database as your main application, point that instance's spring.datasource.url (and user, password, β¦) at the same database.
Targeting a different databaseβ
If a specific maintain task must run against a different database than the configured default, add a task parameter (see Task parameters) whose name is the database criterion and whose value is the target datasource alias.
The parameter name is not hardcoded to database: it is the value of awe.database.parameter-name, which defaults to _database_.
- Single-database (default)
- Multi-database
Nothing to configure. With awe.database.multidatabase-enable set to false (the default), every task runs against the single configured spring.datasource, and a parameter named _database_ is treated as an ordinary parameter with no routing effect.
On a deployment with awe.database.multidatabase-enable=true, add a task parameter in step 2 (Task parameters) of the wizard:
| Field | Value |
|---|---|
| Name | _database_ (or your configured awe.database.parameter-name) |
| Source | Value |
| Value | The alias of the target datasource (e.g. reporting) |
When the task executes, its maintain is routed to the datasource registered under that alias instead of the default one.
The connection is resolved as follows:
awe.database.multidatabase-enablemust betrue. When it isfalse, the parameter is ignored and the task always uses the default datasource.- The value must be a registered datasource alias, not a raw JDBC URL. An unknown alias raises an undefined datasource error at execution time.
This applies to maintain tasks only. A command task runs a shell command and has no database connection; see Command execution: local and remote.
Configurationβ
When creating a new task, a task creation wizard is used to personalize the task configuration.
The configuration wizard consists in 5 steps:
1. Basic information.β
In this step we have to add the task basic configuration.
| Element | Definition | Use |
|---|---|---|
| Name | Task name | Required |
| Active | Task status, if not active the task would not be launched | Required |
| Description | Task description | Optional |
| Max. stored executions | Maximum number of executions to be stored in the database (Used to calculate the average time). The default value is 10. | Optional |
| Timeout | Maximum time for the task to finish. If the task execution time exceeds the timeout time (represented in seconds) the task will be interrupted | Optional |
| Execute | The task execution type (Command or Maintain) | Required |
| Command | Command to launch | Required (Only needed in Command launch type) |
| Execution path | Working directory the command runs in, and fallback location for the command: the host PATH is searched first, this path second | Optional (Only needed in Command launch type) |
| Run on remote server | When checked, the command runs on a remote host over SSH instead of on the local AWE host | Optional (Only needed in Command launch type) |
| Remote server | The SSH server on which the command is executed | Required when Run on remote server is checked |
| Maintain | Maintain to launch | Required (Only needed in Maintain launch type) |
| Launch dependencies in case of warning | Launch the task dependencies in case of warning | Optional |
| Launch dependencies in case of error | Launch the task dependencies in case of error | Optional |
| Set execution as warning in case of error | Sets the parent execution as warning in case of dependency error | Optional |
Note: To add a new maintain to the Scheduler, the maintain must be set to
public="true".
2. Task parametersβ
This step allows to add the needed parameters to the maintain or command for its execution.
These parameters are loaded to the application context when the task is going to be executed. In this way, the task can get the parameters in the execution time.
| Element | Definition | Use |
|---|---|---|
| Name | Parameter name | Required |
| Source | Parameter source, the place from which the parameter will take its value | Required |
| Type | The parameter type (Only used to give extra information to the user) | Required |
| Value | For Value, the literal value used. For Property, the key of the application property to resolve. For Variable, the default value pre-filled in the manual-launch dialog (may be left empty) | Optional |
Note: If the task launch type is
Maintain, the needed parameters for the selected maintain will be automatically added to the task parameters screen.
Parameter sourcesβ
The Source determines where each parameter takes its value from at execution time:
- Value β the parameter uses the literal value typed in the Value field.
- Property β the value is resolved at execution time from the application property whose key is in the Value field (for example a value configured in
application.yml). Use it to keep environment-specific values out of the task definition. - Variable β the value is supplied by the operator when the task is launched manually. This is for inputs that are only known at run time (a business date, an entity id, a run modeβ¦) and should not be hardcoded in the task.
When a task has one or more Variable parameters, launching it from the task list opens a dialog with an editable grid listing exactly those parameters. Each row is pre-filled with its configured Value as an editable default; the operator reviews or changes the values and presses Launch, and the task runs with them. Tasks without Variable parameters launch directly, with no dialog.
Note: The dialog only appears on manual launch, where an operator is present to fill it in. On scheduled and file launches there is nobody to prompt, so a
Variableparameter falls back to its configured Value. On dependency launch the value is inherited from the parent task β see Parameter propagation to dependencies.
3. Task launchβ
In this step we will configure the launch type for the task.
We can choose from four different options:
1. Manualβ
The task will only be launched manually from the task list screen.
Note: For a task to be added as a dependency, the launch type must be set to
Manual.
2. Scheduledβ
The task will be launched with a cron pattern based schedule.
See schedule configuration guide for more information about how to create schedules for a task.
3. Fileβ
With this launch type, the task will launch a check in the selected file/s with the configured schedule.
To know how to create a schedule for the task see schedule configuration guide.
The remaining fields are:
| Element | Definition | Use |
|---|---|---|
| Search at | The server in which the scheduler has to check for the files | Required |
| File path | The path in which the file/s are located | Required |
| File pattern | The pattern that the files have to match with | Required |
The server's connection type decides how the check is performed: folder reads a local or shared
folder, ftp connects over FTP, and ssh connects over SFTP.
Note: The connection credentials are not configured here. Both
ftpandsshservers authenticate with the credentials stored on the server itself, the same ones used for remote command execution, so every task pointing at the same server shares them.
4. Webhookβ
The task is launched when another system sends a signed webhook to it. A webhook task has no schedule of its own: each valid webhook launches it once, immediately, as a manual launch does.
The hook of the task is defined with these fields:
| Element | Definition | Use |
|---|---|---|
| Hook key | Last part of the URL. Lowercase letters, digits and hyphens, 1 to 64 characters. Another task cannot use it: a repeated key is rejected when saving | Required |
| Hook active | A hook that is not active is answered with 409 and launches nothing | Required |
| Secret property | Name of the application property that holds the signing secret. The secret itself is never stored or shown | Required |
| Event type | Only webhooks of this type launch the task, the others are stored and ignored. Empty accepts any type | Optional |
The form shows the Webhook URL of the key, ready to copy into the sender:
https://<host>/<context-path>/scheduler/api/v1/webhooks/triggers/<hookKey>
The requestβ
The request follows Standard Webhooks: a POST with a JSON body and the headers webhook-id (unique id of the message), webhook-timestamp (Unix seconds) and webhook-signature.
{
"type": "fit.market-data.loaded",
"timestamp": "2026-11-13T06:00:02Z",
"data": { "date": "2026-11-12", "entity": "0049" }
}
The body must be a JSON object with a data object and an optional type. The signature is v1, followed by the base64 of the HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{body} (the exact bytes of the body), keyed with the secret without its whsec_ prefix, decoded from base64:
import base64, hashlib, hmac
key = base64.b64decode("whsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8=".removeprefix("whsec_"))
signed = f"{msg_id}.{timestamp}.{body}".encode()
signature = "v1," + base64.b64encode(hmac.new(key, signed, hashlib.sha256).digest()).decode()
To test a sender, this vector gives the expected signature (with the timestamp check disabled or the clock fixed):
| Data | Value |
|---|---|
| Secret | whsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8= |
webhook-id | 0193f2a4-6c1e-7b3a-9d2e-5f8a1c4e7b20 |
webhook-timestamp | 1763029530 |
| Body | {"type":"job.finished","timestamp":"2025-11-13T10:25:30Z","data":{"jobId":"0193f2a0-1111-7aaa-8bbb-000000000001","status":"COMPLETED"}} |
webhook-signature | v1,A4hcS6QMtMJGUshESWRCI0SK2l7hfSW/LXYbcYD8Ef0= |
The responsesβ
| Response | When |
|---|---|
202 {"messageId": "<webhook-id>"} | Accepted, also when the webhook-id was already received. The task is launched later, outside the request |
400 | The body is not a JSON object with a data object |
401 | The signature or the timestamp are not valid, or the secret property has no value |
404 | Unknown hook key |
409 | The hook or its task are not active |
413 | The body is bigger than awe.scheduler.webhooks.max-body-size |
Deduplication. A webhook is identified by its hook key and its webhook-id. A webhook that was already received is answered with 202 again and does not launch the task a second time, so a sender can retry safely.
Processing. The webhook is stored in an inbox and answered at once. A processor launches the task from the inbox every awe.scheduler.webhooks.process-interval. If the launch fails it is tried again after a growing wait, up to 3 attempts in total, and then the webhook stays failed with its error. Processed, ignored and failed webhooks are purged after awe.scheduler.webhooks.inbox-retention. The execution shows webhook:<hookKey> as who launched it. If the task is already running, the webhook launches another execution, as a manual launch does. While the scheduler is stopped the webhooks wait in the inbox, and they are launched when it starts again.
Parameter pointersβ
The Parameters step of a webhook task has a JSON pointer column. A pointer (for example /date) says which value of the data of the webhook goes into the parameter:
- Only
VARIABLEparameters with a pointer receive webhook values: the pointers are an allow list, and nothing else of the webhook reaches the task. - A pointer that is not in the webhook leaves the stored value of the parameter.
- The mapped values become the parameters of the run, so they reach every step of the flow that the task starts (see Flow runs and fan-in).
The properties, the secret rotation and the migration are in the Configuration guide.
4. Task dependenciesβ
In this step we will configure which tasks have to be executed after the current task finishes.
Playing with these options, we can create a workflow.
| Element | Definition | Use |
|---|---|---|
| Task | The task to be executed | Required |
| Blocking | Defines if the task is blocking or not. If it is, the task will be executed synchronously, and it will cancel the dependency launch stack if the task ends with an error. Otherwise, the dependency will be launched asynchronously | Required |
| Order | The order in which the synchronous task has to be launched in the synchronous dependency stack, the asynchronous dependencies will be launched as they come, with no defined order | Required |
Note: The dependencies can also have their own dependencies to create a workflow.
Parameter propagation to dependenciesβ
When a task launches its dependent (child) tasks, the parent's parameter values at execution time are propagated to each child. The child defines the contract: only the child's Variable parameters whose name matches a parent parameter are overridden with the parent's value. Every other parent parameter is ignored by that child, and the child's non-Variable parameters are never touched.
- What propagates β the parent's value for a given name, regardless of the parent parameter's source (
Value,PropertyorVariable). Where the parent obtained the value is irrelevant; only the name matters. - Default when absent β if the parent does not supply a matching name, the child keeps its own configured Value as the default (no regression versus previous behavior).
- Cascade β at each hop the propagation map is rebuilt from the current task's own parameter list, so a value only continues past an intermediate task if that task also declares a parameter with that name. A value the parent supplies for a name an intermediate child does not declare stops at that child and is not passed on to the grandchild.
Example, with a parent task that holds database = "prod" (source Value):
| Child parameter declaration | Effective value in the child | Why |
|---|---|---|
database as Variable | "prod" | Name matches a parent parameter and the child opted in via Variable |
database as Value = "test" | "test" | Not a Variable; never overridden |
region as Variable (parent has no region) | its configured default | Parent supplies no matching name |
This reuses the same mechanism as the operator-supplied values on manual launch, so a value an operator typed into the parent's launch dialog also flows down to its dependents.
Propagation is name-based: any dependent task that declares a Variable parameter matching a parent parameter name receives the parent's value at execution time β including values that may be sensitive (credentials, connection strings). Task configuration is an administrator-trusted boundary; do not attach dependencies of untrusted provenance to tasks holding sensitive parameters.
5. Task reportβ
The last step is to choose a report type.
The report will give information about the task when it finishes.
We can choose one of these four options:
5.1 Noneβ
Used when we don't want to retrieve any report from the task.
This could be compared to the silent-action in AWE.
5.2 Emailβ
This option will send an email with the task information, and it will also add the dependencies information if any.
| Element | Definition | Use |
|---|---|---|
| Send in case of | Set the allowed status (task status when it finishes) for sending the email | Required |
| Email server | The email server form where the email is going to be sent | Required |
| Send to users | The list of users to send the email | Required |
| Title | The title of the email | Required |
| Message | The message to be added in the email | Required |
Note: The email will also add basic information about the task itself and its dependencies.
Dynamic variables in Title and Messageβ
The Title and Message fields support ${variable} placeholders that are resolved with per-execution values before the email is sent. This lets a single template produce a customized email for every task execution.
Placeholders can reference two kinds of values: task/execution metadata (reserved names) and task parameters (by name).
Metadata variables
| Variable | Description |
|---|---|
${taskName} | Name of the task |
${taskId} | Task identifier |
${taskDescription} | Task description |
${status} | Final execution status label (e.g. OK, ERROR) |
${statusDetail} | Additional detail about the execution status |
${executionId} | Execution identifier |
${command} | Command/action executed by the task |
Task parameter variables
Any placeholder whose name matches a task parameter (from the task Parameters tab) is replaced with that parameter's value. For example, ${env} resolves to the value of the env parameter.
Resolution rules
- Reserved names take precedence. If a task parameter has the same name as a metadata variable (e.g.
status), the metadata value wins and a warning is logged naming the shadowed parameter. - Unknown placeholders are kept literally. A
${variable}with no matching metadata key or task parameter is left untouched in the output; it is never blanked or removed. - HTML is escaped safely. In the HTML body, substituted values are HTML-escaped so they cannot break the markup or inject content; the plain-text body receives the raw values. The template text itself is never escaped.
- Backward compatible. A Title or Message without any
${...}placeholder is sent exactly as written.
Example
- Title:
Task ${taskName} finished: ${status} - Message:
Execution ${executionId} for environment ${env} ended with status ${status}.
Note: Variable substitution applies only to the Title and Message fields, not to the fixed task-details block that the report appends automatically.
5.3 Broadcastβ
This option will send a broadcast message with the given message to the selected users only.
| Element | Definition | Use |
|---|---|---|
| Send in case of | Set the allowed status (task status when it finishes) for sending the broadcast | Required |
| Send to users | The list of users to send the broadcast | Required |
| Message | The message to be sent in the broadcast | Required |
5.4 Maintainβ
This option will launch the selected maintain as a report.
| Element | Definition | Use |
|---|---|---|
| Send in case of | Set the allowed status (task status when it finishes) for executing the maintain | Required |
| Message | The message to be sent, it will be added to the context in order to be available for the selected maintain | Optional |
Note: The task data will be added to the context in order to be available for the selected maintain, to get the data, it is recommended to use the TaskConstants interface variable names from the Scheduler package.
Task managementβ
The existing tasks can be managed from the scheduler tasks screen, where we will have a list of the created tasks.
The list will show some basic information of each task, like the name, the launch type (icon), the last and next execution times, the task status and the execution average time.
When selecting one task, some options will be activated:
| Option | Definition | Multiple |
|---|---|---|
| Update | Update the selected task | No |
| Delete | Delete the selected task/s | Yes |
| Start | Launch the selected task as a manual task. It doesn't need to be a manual task in order to launch an instance of the task manually | No |
| Activate/Deactivate | Activates / deactivates the selected task, the label changes depending on the selected task current status | No |
Serversβ
The servers created for the Scheduler module are mainly used to execute tasks, and in tasks that need to check if a file has changed.
The scheduler servers are used with two purposes: to run command tasks on a remote host over SSH, and to check for file modifications on a remote server.
For remote command execution choose the ssh connection type and provide the connection user together with a password and/or a private key (which may be passphrase-protected). For file checking choose ftp to connect over FTP, or ssh to connect over SFTP β preferable where FTP is disallowed, since it reuses the SSH credentials and host-key verification. An ftp server authenticates with the server user and password too; leaving the user empty keeps anonymous access.
The same server can be used by as many tasks as needed. Its connection credentials are stored on the server itself, so all of them share the same user and password.
Configurationβ
When creating a new server, the next fields have to be filled:
| Element | Definition | Use |
|---|---|---|
| Name | Server name | Required |
| Server | Server IP address | Required |
| Port | Server port | Required |
| Type of connection | The protocol to be used to connect to the server | Required |
| User | User for the server connection (shown when the connection type is ssh or ftp) | Required for ssh |
| Password | Password for the server connection (shown when the connection type is ssh or ftp) | Optional |
| Private key | Private key for SSH key-based authentication (shown when the connection type is ssh) | Optional |
| Private key passphrase | Passphrase that unlocks the private key, if it is encrypted (shown when the connection type is ssh) | Optional |
| Active | Server status | Required |
Note: If a server is deactivated, the task using it won't even try to connect to it.
Note: An
sshserver authenticates with the user plus a password, a private key (optionally unlocked with its passphrase), or both. Only the user is mandatory; provide at least one of password or key.
Note: An
ftpserver authenticates with the user and password only, both optional: leave the user empty for anonymous access. Private keys are not used over FTP.
Note: SSH authentication is handled by Apache MINA SSHD. The most common private-key algorithms are supported β RSA, ECDSA and Ed25519 β in OpenSSH and PEM formats.
Note: An
sshserver is used both for remote command tasks and for file-existence trigger tasks over SFTP. The configured host-key policy andknown_hostsfile apply to both, so a host trusted for command execution is also trusted for file checking.
Note: Server credentials (password, private key and passphrase) are stored encrypted, per server instance, so the same host can be registered several times with different credentials. On the edit screen they are never sent back to the client: leave a secret field blank to keep the stored value, or type a new value to replace it.
Managementβ
The scheduler server list will show a list of servers with their basic information: name, server ip, connection protocol and status.
When selecting one of the servers from the list, some options will be enabled:
| Option | Definition | Multiple |
|---|---|---|
| Update | Update the selected server | No |
| Delete | Deletes the selected server/s | Yes |
| Activate / Deactivate | Activates / deactivates the selected server, the label changes depending on the selected servers current status | No |
Calendarsβ
The task inside the scheduler can be modified to ignore some dates by using holiday calendars.
Those calendars contain the dates that have to be ignored by the scheduler in the task schedule.
Each of the tasks can only be associated with one calendar.
The calendars inside Scheduler module are used to set the dates where the tasks won't have to be executed, like for example, holidays, or weekends.
Each task can only have associated one calendar, but there can be created as many calendars as needed, and then just change the calendar associated to the task.
Configurationβ
The calendar configuration procedure consists in two steps:
Create calendarβ
The first step is to create the calendar itself, which will have the next basic information.
| Element | Definition | Use |
|---|---|---|
| Name | The calendar name | Required |
| Description | The calendar description | Required |
| Active | The calendar status | Required |
Note: If the calendar status is set to
Active = Nothe task will ignore the calendar, and it will be launch as if it wasn't associated with it.
Add datesβ
Once the calendar is created, from the calendar configuration screen, we can add new dates by selecting the option edit on the top right side of the screen.
When we get to the edition screen we will have to fill the next fields for each date.
| Element | Definition | Use |
|---|---|---|
| Date | The date to add to the calendar | Required |
| Name | A name to assign to the date, for example, a holiday name | Optional |
Managementβ
On the calendar list screen, when selecting one of them, the next options will be available:
| Option | Definition | Multiple |
|---|---|---|
| Edit | Redirects to the edition screen where we can change the calendar data, and add/remove/update calendar dates | No |
| Delete | Delete calendar and all its associated dates | Yes |
| Activate/Deactivate | Activates / deactivates the selected calendar, the label changes depending on the selected calendars current status | No |