Scheduling Work with eve
eve has dynamic scheduling built in, and it runs on Edgenivo Schedules. Export a defineDynamicSchedules definition from agent/schedules/. eve gives the model tools to create, list, update, and cancel schedules, and calls run each time one fires.
agent/schedules/reminders.ts
import { defineDynamicSchedules } from 'eve/experimental/schedules';
import { z } from 'zod';
import slack from '../channels/slack';
import { resolveCurrentUser, resolveDm } from '../lib/users';
export default defineDynamicSchedules({
description: "Schedule tasks that report back in the creator's Slack DM.",
inputSchema: z.object({ task: z.string().min(1).max(2000) }).strict(),
// Look up the creator's current access before each run. Return null to deny.
auth: ({ principal }) => resolveCurrentUser(principal),
async run({ payload, occurrence, to, auth }) {
await to(slack, await resolveDm(auth)).send(`Do this task now: ${payload.task}`, {
// Runs can repeat; the same key reaches the session the first attempt started.
idempotencyKey: `${occurrence.executionId}:task`,
});
},
});The file path names the definition, so agent/schedules/reminders.ts gives the model tools like schedule__reminders__create. Schedules are scoped to the user who created them, and changes need the user's approval by default.
The model picks the timing:
| Expression | Example |
|---|---|
delay | { type: 'delay', minutes: 30 } |
single | { type: 'single', at: '2026-11-15T09:00', timezone: 'America/New_York' } |
cron | { type: 'cron', cron: '0 9 * * 1-5', timezone: 'America/New_York' } |
Last updated November 4, 2026
Was this helpful?