> For the complete documentation index, see [llms.txt](https://mimic-api.gitbook.io/mimic-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mimic-api.gitbook.io/mimic-api-docs/guides/concepts/scheduling.md).

# Scheduling

Cron schedules and signing deadlines.

Strategies execute on a recurring schedule that you define when you create them.

## Cron expressions

Standard 5-field cron, **evaluated in UTC**:

```
┌───────── minute (0-59)
│ ┌─────── hour (0-23)
│ │ ┌───── day of month (1-31)
│ │ │ ┌─── month (1-12)
│ │ │ │ ┌─ day of week (0-6, Sunday = 0)
│ │ │ │ │
0 0 * * *
```

| Expression    | Meaning                        |
| ------------- | ------------------------------ |
| `0 0 * * *`   | Every day at midnight          |
| `0 9 * * 1`   | Every Monday at 09:00          |
| `0 */6 * * *` | Every 6 hours                  |
| `30 14 1 * *` | 14:30 on the 1st of each month |

{% hint style="info" %}
UTC, always. A "daily at midnight" schedule fires at midnight UTC regardless of where your user is — worth surfacing in your UI if you show them a local time.
{% endhint %}

## Signing deadlines

A strategy's prepare response includes `signBefore`, a Unix timestamp in milliseconds. Submit the signature after it and the strategy is marked `stale` and can never execute — call `prepare` again for a fresh payload.

This matters most when a human is in the signing loop. If your user might leave the tab open, re-prepare rather than holding a payload.

## When the next execution happens

`GET /{action}/{id}` returns `nextExecution`, a timestamp, while the strategy is `active`. It is omitted for any other status — so its absence is a signal, not a gap.

## Executions that do not happen

A scheduled execution can be skipped rather than run:

* **Fee ceiling.** Each strategy carries `maxUsdPerExecution`, derived at prepare time. If an execution's fee would exceed it, that execution is skipped. This protects a long-running strategy from gas spikes.
* **Spend cap.** `maxTotalAmount` stops the strategy after the last execution that fits within it. The status becomes `ended`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mimic-api.gitbook.io/mimic-api-docs/guides/concepts/scheduling.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
