# Scheduled tasks

Some things should happen on their own, on a schedule: a reminder email every
morning, a weekly summary, a nightly tidy-up. Your app can do that — you don't have
to keep anything open, and neither does your AI. onvibe runs the task for you at the
times you choose.

## What it's good for

- **Reminders** — "email people about things expiring in 3 days, every morning."
- **Digests** — "send me a summary of new sign-ups every Monday at 9am."
- **Clean-ups** — "delete unconfirmed entries older than a week, every night."
- **Refreshes** — "re-check prices once an hour."

## How to ask for it

Just describe it in plain words and your AI sets it up. Be specific about **when**
and **what**:

> "Every day at 9am (Madrid time), look for items that expire in the next 3 days and
> email their owners a reminder."

Your AI will add the schedule and the code that runs, then deploy. From then on it
runs by itself.

## Good to know

- **How often**: anything from once a minute to once a month. The smallest step is
  one minute.
- **Time zone**: say which one (e.g. "Madrid time"), or it defaults to UTC.
- **Keep it quick**: each run has about a minute to finish. For big jobs, ask your AI
  to process things in batches.
- **You're in control**: ask your AI to "list the scheduled tasks" to see them, or
  "run the reminders task now" to test it without waiting.
- **Emails**: scheduled tasks pair naturally with sending email — just say what the
  message should contain.

## A ready-to-copy prompt

> "Add a daily scheduled task that runs at 8:30 in the morning (Europe/Madrid). It
> should find everything in my app that's due within 2 days and send each person a
> short reminder email. Then show me how to test it."
