Schedules
A schedule starts the agent on a cron cadence instead of waiting for a message. Each schedule is one file under agent/schedules/. Use schedules for work such as daily digests, data syncs, cleanup sweeps, and heartbeats.
Markdown form (fire-and-forget)
The smallest schedule is a markdown file. Its frontmatter takes cron, and the body is the prompt:
The same schedule in TypeScript uses content for the prompt:
A markdown-form schedule runs the agent on the prompt and discards the reply. The agent can still call tools, write to backends, and log. The session has no channel, so it can't ask a person for input or receive a follow-up message. A tool that needs approval fails the session instead of waiting. After the turn ends, the session stays open until its session timeout ends it.
defineSchedule
Every schedule provides a cron and exactly one of content or run. The build fails otherwise.
A schedule with content needs no code at runtime. A schedule with run stays loaded at runtime so the handler can execute. See Authored module lifecycle.
cron is a standard 5-field string (minute hour day-of-month month day-of-week) with minute granularity. Set timezone to an IANA timezone to keep a local time across daylight saving changes:
This schedule runs at 13:00 Pacific: 20:00 UTC in summer and 21:00 UTC in winter. Markdown schedules accept the same timezone field in frontmatter. eve stores the canonical timezone name, so "utc" builds as "UTC". Invalid timezone values fail the build.
Omit timezone to use UTC on Vercel or the process timezone on self-hosted apps. Set timezone: "UTC" for UTC on either host. Explicit timezones are supported on Vercel and the Node server used by eve start; other Nitro presets fail the build.
eve dev never fires schedules on their cadence, but a built app served with eve start does. In development, use the dispatch route.
The name comes from the path under schedules/, so agent/schedules/billing/sweep.ts is "billing/sweep". Mounted extensions can add schedules from extension/schedules/. The mount name becomes a prefix: extension/schedules/sweep.ts mounted as crm is "crm__sweep", with the same cron expression. Declared subagents can't have a schedules/ directory.
Handler form (run)
Use a handler when the schedule sends to a channel, branches on conditions, or computes its message when it fires. A handler has no channel of its own. It selects a channel target with to(...) and sends through the returned handle:
to(channel, target).send(message, { auth, ...options }) starts a session on that channel. It takes the same options as a route handler's ctx.to(...) handle.
The auth option sets which identity the session runs as. appAuth is the app's own identity ({ authenticator: "app", principalId: "eve:app", principalType: "runtime" }), for work the agent does for itself. When scheduled work needs a user's grants, pass that user's auth instead. The session still records that a schedule started it.
Every run sends the agent's reply to the channel. To skip a run with nothing to report, check in the handler before you call send. When only the agent can tell, add the opt-in no_reply tool and ask the agent to call it, so the run posts nothing.
A handler-form session can pause and wait like any other session, for example while a Slack thread waits for a reply.
Detect the app principal
isScheduleAuth(auth) returns true when auth is the app identity that schedules pass as appAuth. Markdown-form sessions also run as that identity. Use it in tools, hooks, or channel handlers to treat the agent's own work differently from a user's:
isScheduleAuth checks the identity, not how the turn started. It returns false when a schedule handler sends with a user's auth, and true for any code that passes appAuth along.
Session continuity
Markdown-form schedules start a new session each time they fire. Handler schedules do too, unless they send to an existing conversation, such as a Slack thread. Store data that must carry over between runs outside session state.
Trigger a schedule while iterating
eve dev never runs schedules on their cadence, so the dev server adds a route that fires a schedule by name once:
:scheduleId is the schedule name from its path (agent/schedules/heartbeat.ts → heartbeat). URL-encode the / in nested names. The route fires the schedule as production cron does and returns the started session IDs. Subscribe to each session's stream at GET /eve/v1/session/:sessionId/stream.
An unknown name returns 404 with availableScheduleIds, which lists the app's schedules.
The route exists only in development. Production builds never include it. It needs no auth because the dev server is local-only.
On Vercel
Hosted Vercel builds run every schedule with Vercel Schedules. Each schedule becomes its own Vercel schedule in .vercel/output/config.json. The schedule invokes a private function that has no public route, so no CRON_SECRET is needed. Each schedule runs in its own invocation, so one failing schedule doesn't affect the others. Failed invocations aren't retried.
Vercel Schedules is in beta. Each run starts within a short jitter window after its scheduled time, and plan limits apply. On Hobby, a schedule can run at most once every 15 minutes.
Each Vercel schedule is named eve. plus the schedule's name, with / replaced by .: agent/schedules/billing/sweep.ts is eve.billing.sweep. Use that name with vercel schedules, for example vercel schedules invoke eve.billing.sweep. A name with characters that Vercel schedule names don't allow, including ., keeps them as . and ends with a short hash, so weekly report.ts becomes eve.weekly.report-<hash>. Renaming a schedule's file creates a new Vercel schedule.
When withEve adds agents to a Next.js deployment, each agent builds as a Vercel service, and Vercel attaches each schedule to the service that built it. These schedule names include the agent's name, so the agents in one project never share a name: agents/billing/agent/schedules/heartbeat.ts is eve.billing.heartbeat.
When you run vercel build locally, use Vercel CLI 65.14.0 or later. Older releases fail the build for withEve projects, and releases before 62.7.0 drop schedules from the output without an error.
Find each schedule's run history with vercel schedules executions list <name>, and per-run logs under Observability → Logs.
Self-deployed hosts
Outside Vercel, eve build && eve start runs schedules while the Node server process runs. Schedules with an explicit timezone keep their configured local time across daylight saving changes.
For a fixed daily time, such as "30 2 * * *", a skipped local time runs at the next valid local time. A repeated local time runs once, at its first occurrence. Vercel schedules use the platform's timezone handling.
A process manager, container platform, or Nitro preset that only serves HTTP doesn't start the schedule runner. Schedules build but never fire. In that case, choose one:
- Run eve through
eve start. - Use a host that supports Nitro scheduled tasks.
- Trigger the work from your own scheduler through an authenticated route, channel handoff, or job runner.
What to read next
defineSchedule covers fixed schedules in code. For schedules that users or the agent create at runtime, see Experimental dynamic schedules.
- Channels: deliver schedule output to users.
- Sessions, runs & streaming: inspect a schedule run.