Guide

Run a job on a schedule

Set up a backend job that runs on its own every day or hour, such as a morning summary email, then check that it ran and change or stop it.

Last updated Open in ClaudeOpen in ChatGPT
On this page

This guide sets up a job that runs on a timer. The example: every morning at 7, email yourself a summary of yesterday's bookings.

1. Describe the job

Say what should happen, how often, and at what local time:

"Every morning at 7am London time, email me a list of yesterday's bookings: name, time and party size. If there were none, don't send anything."

Willo will need a way to send the email. If you haven't connected an email service yet, it asks for an API key through the secure form (see Secrets and API keys).

2. Let Willo build the function

Willo writes a backend function that does one run's worth of work (read yesterday's bookings, send one email) and deploys it. The function checks that each call really comes from your scheduler, so nobody else can trigger it by finding its address.

If you're drafting, Willo asks you to publish at this point. Jobs only run against your live backend, so the function has to be live first.

3. Approve the schedule

Willo proposes the schedule on a card. Check:

  • The time. Schedules run in UTC. 7am in London is 07:00 UTC in winter but 06:00 UTC in summer, and a schedule doesn't move with the clocks. Willo tells you the UTC time it picked; decide which half of the year you want it exact for.
  • How often. Your plan sets the most frequent schedule allowed. See Scheduled backend jobs.
  • The projected usage each month, which comes out of your plan's included backend usage.

Approve, and the job is live.

If Willo says the schedule doesn't fit your plan's included usage, it suggests the most frequent one that does. A daily job almost always fits.

4. Check it ran

The morning after, ask: "did the bookings summary run?" Willo reports:

  • the last dispatch: when the timer sent the request, and
  • what the function's logs show: whether it ran cleanly and sent the email.

A dispatch without the email means the function has a problem. Ask Willo to read the logs and fix it.

5. Change or stop it

  • Change the time or frequency: "move the bookings summary to 8am". Re-using the job's name replaces it.
  • Change what it does: "add the total number of guests at the top". Willo redeploys the function; the schedule stays.
  • Stop it: "stop the bookings summary job". This takes effect at once and needs no confirmation.

Good to know

  • A business can have up to 10 jobs.
  • Each run has 60 seconds. For larger work, the function processes a batch per run and picks up where it left off.
  • If your backend is paused for hitting its monthly usage, jobs pause too and run again once it is resumed.

Related: Scheduled backend jobs, Backend functions.