skip to content
$worker

cron

v0.21.9

Schedule functions with cron expressions - registers the `cron` trigger type.

iiiverified
3,068 installs407 in 7d22 today
install
$iii worker add cron@0.21.9
binarylicense: Apache-2.0cronjobscheduletimer
  • macOS: arm64 · x64
  • Linux: arm64 · armv7 · x64
  • Windows: arm64 · x64 · x86

exact versions are immutable; binary and bundle artifacts are digest-pinned.

functions

2

cron::on-config-change

function

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

request
empty object
response
  • okbooleanrequired

cron::ui-content

function

Serve the cron worker's injected console UI assets (content function for its console:script / console:style 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.

triggers

1

cron

trigger

Cron-based scheduled triggers

invocation
  • 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).

return
  • actual_timestringrequired

    Actual execution time (RFC3339)

  • job_idstringrequired

    Unique job identifier

  • scheduled_timestringrequired

    Scheduled execution time (RFC3339)

  • triggerstringrequired

    Always "cron"