Skip to content
Sign in

cron

v0.21.28

Run functions on cron schedules — hosts `cron::on-tick`; each observer of it passes `{ expression }` as args and receives that expression's ticks.

license: Apache-2.0Used in 1 kitcronjobscheduletimer

Install

bash
iii call compose::add worker=cron@0.21.28

Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.

Functions4

cron

Function

Cron-based scheduled triggers

Request
  • condition_function_idstring

    Optional function ID to evaluate before invoking the handler.

  • expressionstringrequired

    Cron expression (6-field format: sec min hour day month weekday; a 7th year field is accepted).

Response
  • actual_timestringrequired

    Actual execution time (RFC3339)

  • job_idstringrequired

    Unique job identifier

  • scheduled_timestringrequired

    Scheduled execution time (RFC3339)

  • triggerstringrequired

    Always "cron"

cron::on-config-change

Function

Internal: reload cron configuration from the authoritative store on change.

Request
Empty object
Response
  • okbooleanrequired

cron::on-tick

Function

Fires on a cron schedule. Observe it with args { expression } (UTC; 6 fields: sec min hour day month weekday, a 7th year field is accepted); every observer of an expression receives { trigger, expression, scheduled_time, actual_time } once per fire. Only the cron worker fires it: invoking it directly is refused.

Request
  • actual_timestringrequired

    RFC 3339, UTC.

  • expressionstringrequired

    The expression that fired, exactly as the observer passed it in args.

  • scheduled_timestringrequired

    RFC 3339, UTC.

  • triggerstringrequired

    Always `cron`, as in the trigger payload: kept while the trigger type is deprecated, so a handler moved over that switches on it still works.

Response
valuenull

cron::ui-content

Function

Serve the cron worker's injected console UI assets (content function for its console:script / console:style / console:module triggers).

Request
  • pathstringrequired

    The asset path from the trigger config (e.g. `state/page.js`).

Response
  • contentstringrequired

    The asset source, verbatim.

  • content_typestringrequired

    MIME type the console should serve the asset with.

Search the registry

Find workers, kits and executables, or jump to a page.