# `Jido.Agent.Directive.Cron`
[🔗](https://github.com/agentjido/jido/blob/v2.3.0/lib/jido/agent/directive/cron.ex#L1)

Register or update a recurring cron job for this agent.

The job is owned by the agent's `id` and identified within that agent
by `job_id`. On each tick, the scheduler sends `message` (or `signal`)
back to the agent via `Jido.AgentServer.cast/2`.

## Fields

- `job_id` - Logical id within the agent (for upsert/cancel). Auto-generated if nil.
- `cron` - Cron expression string (e.g., "* * * * *", "@daily", "*/5 * * * *")
- `message` - Signal or message to send on each tick
- `timezone` - Optional timezone identifier (default: UTC)

## Examples

    # Every minute, send a tick signal
    %Cron{cron: "* * * * *", message: tick_signal, job_id: :heartbeat}

    # Daily at midnight, send a cleanup signal
    %Cron{cron: "@daily", message: cleanup_signal, job_id: :daily_cleanup}

    # Every 5 minutes with timezone
    %Cron{cron: "*/5 * * * *", message: check_signal, job_id: :check, timezone: "America/New_York"}

# `t`

```elixir
@type t() :: %Jido.Agent.Directive.Cron{
  cron: any(),
  job_id: nil | any(),
  message: any(),
  timezone: nil | any()
}
```

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the Zoi schema for Cron.
