Skip to content

Scheduled job

*.job is a JSON descriptor that schedules a handler module on a Quartz cron expression.

File format

json
{
    "expression": "0/5 * * * * ?",
    "group": "defined",
    "handler": "myproject/jobs/cleanup-handler.ts",
    "description": "Nightly cleanup",
    "parameters": [
        { "name": "batchSize", "type": "string", "defaultValue": "1000" }
    ]
}
FieldPurpose
expressionQuartz cron expression (6-7 fields - seconds first).
groupQuartz group name. Use defined for user-authored jobs.
handlerRegistry path of the JS / TS module to execute.
descriptionFree text. Shown in the Jobs perspective.
parametersOptional. Each parameter is { name, type, defaultValue, description, choices }; available to the handler via @aerokit/sdk/job.

The handler module is invoked synchronously on each fire by the Quartz scheduler thread. Long-running work should fork its own thread or queue.

Java alternative - @Scheduled

A client-Java @Component with a method-level @Scheduled(expression = "...") (the Dirigible annotations under org.eclipse.dirigible.sdk.*) is scheduled without a .job artefact - note the attribute is expression, not cron:

java
import org.eclipse.dirigible.sdk.component.Component;
import org.eclipse.dirigible.sdk.job.Scheduled;

@Component
class CleanupJob {

    @Scheduled(expression = "0/5 * * * * ?")
    void run() {
        // ...
    }
}

Alternatively, a @Component implementing the self-describing JobHandler interface carries its own schedule - String cron() plus void run(). .job is preferred when the schedule, parameters, or handler should be authored in the registry (and reloaded without a restart).

Tenancy

Job execution is tenant-isolated - each tenant gets an independent Quartz schedule keyed off its own reconciled .job artefacts.

Released under the EPL-2.0 License.