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 Spring @Component carrying @Scheduled(cron = "...") is auto-discovered by the platform and runs without a .job artefact:

java
@Component
class CleanupJob {
    @Scheduled(cron = "0/5 * * * * ?")
    void run() {
        // ...
    }
}

.job is preferred when the schedule, parameters, or handler should be authored in the registry (and reloaded without a restart). Use @Scheduled for platform-internal Spring beans.

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.