Per-agent cron scheduling with internal timer processes.
Jido.Scheduler is intentionally lightweight and process-local:
each registered cron job is backed by a dedicated process owned by the
caller (typically the owning Jido.AgentServer).
The runtime stores live job processes in AgentServer.State.cron_jobs and
separately stores durable schedule definitions in AgentServer.State.cron_specs.
The durable specs are persisted through Jido.Persist for InstanceManager-
managed agents.
Summary
Functions
Checks if a cron job process is still alive.
Build a normalized durable cron spec map.
Cancels a running cron job.
Reserved internal agent-state key used to stage durable cron specs across hibernate/thaw boundaries.
Normalize a persisted cron-spec map, dropping malformed entries.
Starts a recurring cron job with a function.
Starts a recurring cron job.
Types
Functions
Checks if a cron job process is still alive.
Build a normalized durable cron spec map.
@spec cancel(pid()) :: :ok
Cancels a running cron job.
Examples
{:ok, pid} = Jido.Scheduler.run_every(MyModule, :work, [], "* * * * *")
:ok = Jido.Scheduler.cancel(pid)
@spec cron_specs_state_key() :: atom()
Reserved internal agent-state key used to stage durable cron specs across hibernate/thaw boundaries.
Normalize a persisted cron-spec map, dropping malformed entries.
Starts a recurring cron job with a function.
Examples
{:ok, pid} = Jido.Scheduler.run_every(fn -> IO.puts("tick") end, "* * * * *")
Starts a recurring cron job.
Returns {:ok, pid} where pid is the scheduler job process that can be
used to cancel the job later.
Options
:timezone- Timezone for the cron expression (default: "Etc/UTC")
Examples
{:ok, pid} = Jido.Scheduler.run_every(MyModule, :work, [], "*/5 * * * *")
{:ok, pid} = Jido.Scheduler.run_every(fn -> IO.puts("tick") end, "* * * * *")