# Schedules

> Run functions on a schedule from the web app, or declare the schedule in code.

Source: https://callables.app/docs/schedules

Any function can run on a schedule. Each scheduled run is saved in the run history like any other, with its inputs, logs and result.

## From the web app

Open the function, fill in its form the way it should run, then click **Schedule…** next to Run. Choose:

- Every hour, day, weekday, week (on the days you choose) or month
- Or any cron expression
- A time zone, so 9am stays 9am when the clocks change

You see the next few run times as you edit. Each schedule keeps its own inputs and an optional name, so one function can run every Monday for NA and every Tuesday for EMEA. A toggle pauses a schedule without deleting it.

## In code

For a schedule that should always exist with the code, such as a nightly cleanup:

```python
# Every day at 2am UTC
@deploy(title="Nightly cleanup", schedule="0 2 * * *")
def nightly_cleanup(dry_run: bool = False) -> str:
    ...
```

It's created when you push. Changing or removing the line updates or removes it on the next push. Code schedules use UTC.

## Rules

- **Every input needs a value.** A schedule runs with the inputs saved on it. Code schedules need a default for every input.
- **Functions that take a file upload can't be scheduled.**
- **Schedules run as the person who made them,** with their access. A schedule stops if that person can no longer run the function, so someone leaving the team doesn't leave jobs running under their name.
- People who manage a function see all of its schedules.
