# Schedules and triggers

Run work on a timetable, or the moment an event fires, and let Workspace Admins pause or start it under System settings › Schedules.

Some work should just happen: a reminder every morning at 7, a sync every Friday, a check whenever a new record arrives. **Schedules** run your module's jobs on a timetable. **Triggers** run your agent the moment an event fires. Both are declared in your module and show up in every workspace that installs it.

## Schedules: every morning at 7, every Friday

A schedule names a job in your module and when to run it, written as a cron expression with a timezone:

| You want | Cron |
|---|---|
| Every day at 7:00 | `0 7 * * *` |
| Every Friday at 16:00 | `0 16 * * 5` |
| Every 15 minutes | `*/15 * * * *` |

You choose whether it starts **on** when a workspace installs your module, or is **offered** for a Workspace Admin to switch on. Offering is right for anything that touches the outside world, like reading a mailbox.

A scheduled job has no person behind it, so it does bookkeeping your module does for itself: sending reminders, tidying up, copying data in.

## Triggers: when a record is created, run the agent

A trigger joins an [event](article:db90fa30-3ef5-42e9-bc1a-9fee6fe3034e) to your agent, with a short instruction: *"Triage job {payload.id}."* When the event fires, the agent runs.

There's no person present, so the agent acts as **its own identity**, which holds only the roles a Workspace Admin gives it. With no role, the run is refused. See [Agents and AI models](article:adba700a-3847-4c47-a228-eddb8f0e579f).

## Turning them on and off under System settings › Schedules

A Workspace Admin manages them in one place:

1. Open **System settings**, then **Schedules**.
2. Click a schedule to see when it runs, its timezone and its **History**.
3. Click **Pause** to stop it, or **Resume** to start it again. **Run now** runs it once, straight away.
4. Under **Offered by modules**, click **Turn on** to start a job a module offers. It runs as the admin who turned it on.

**Module-managed** shows only the schedules modules created. **Fire event** sends a test event, to check a trigger without waiting for the real thing.

## Keeping a job safe to run twice

Jobs can run twice: a retry after a hiccup, or **Run now** pressed on a busy day. Make every job safe to repeat:

- **Check before you act.** "Already reminded about this due date?" Skip it.
- **Use a dedupe key** for [notifications](article:c1fc4f79-8d90-4ce8-96ab-59826e3a3a66), so a person is told once.
- **Start long work and return.** A job gets 60 seconds per call. Start the slow part (a long Bridge job or a compute job) and pick up the result next time.

## Ask the Module Builder

> *"Every weekday at 7am, remind each crew lead about yesterday's missing daily reports. And whenever a new request comes in, have the agent sort it by urgency."*

## For developers

```json
"scheduler": {
  "entity_types": [{"entity_code": "DAILY_REMINDERS", "name": "Daily reminders",
    "handler": "JOBS.send_reminders", "default_cron": "0 7 * * 1-5",
    "timezone": "America/Los_Angeles", "auto_create": true}],
  "agent_triggers": [{"trigger_code": "TRIAGE_NEW", "name": "Triage new jobs",
    "event": "jobs.job_created", "agent_code": "JOBS_AGENT",
    "prompt": "Triage job {payload.id}.", "auto_create": true}]
}
```

The handler is a service your module registers (and declares) with no permission, because a schedule has no user.

## Good to know

- **Schedules are included**; they aren't metered. What the job does may be, such as AI use.
- **Pausing or deleting keeps the history**, so you can still see what ran.
- **Work on outside input** (an email, a web form) should start the agent with only the tools that job needs, and treat the content as data, never as instructions.


Source: https://datavisions.ai/docs/creators/platform-services/schedules-and-triggers
