---
title: "Spread scheduled work across the hour · Agent Wranglers"
url: https://agentwranglers.se/playbook/events/background-jobs-and-queues/spread-scheduled-jobs
id: EVT-21
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 834
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Spread scheduled work across the hour

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Background jobs and queues](https://agentwranglers.se/playbook/events/background-jobs-and-queues.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: EVT-21
- Level: Recommended
- Chapter: [Background jobs and queues](https://agentwranglers.se/playbook/events/background-jobs-and-queues.md)
- Rule: Give each scheduled job its own start minute instead of the full hour. Split jobs that touch every customer into batches with gaps between them.
- Check: No two jobs that run longer than 1 minute share a start minute in the schedule. Over the last 7 days, database CPU at minute 0 of each hour is under 1.5 times the hourly average.
- How: Jobs set to `0 * * * *` all start together and make a load peak every hour. Many teams pick midnight, so outside services are busy then too. Pick an odd minute per job, such as 17 or 43. A job over all customers works in batches, as [Change large tables in small batches](https://agentwranglers.se/playbook/scaling/growing-the-database/small-batches.md) shows. Run each once, as [Run each scheduled job once at a time](https://agentwranglers.se/playbook/events/background-jobs-and-queues/single-job-runs.md) says, and report a [heartbeat](https://agentwranglers.se/playbook/operations/alerts-and-on-call/job-heartbeats.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Plain text example

```text
# crontab for a made-up shop: one minute per job
17 * * * *  /srv/shop/bin/run-job sync-stock
43 * * * *  /srv/shop/bin/run-job expire-carts
11 3 * * *  /srv/shop/bin/run-job nightly-invoices
```

## Sources

- [Google SRE book, Distributed Periodic Scheduling with Cron](https://sre.google/sre-book/distributed-periodic-scheduling/)

## Related rules

- SCL-27 [Change large tables in small batches](https://agentwranglers.se/playbook/scaling/growing-the-database/small-batches.md) in Scaling
- EVT-22 [Run each scheduled job once at a time](https://agentwranglers.se/playbook/events/background-jobs-and-queues/single-job-runs.md) in Integration and events
- OPS-23 [Alert when a scheduled job stops running](https://agentwranglers.se/playbook/operations/alerts-and-on-call/job-heartbeats.md) in Operations and observability

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/events/background-jobs-and-queues/spread-scheduled-jobs">Agent Wranglers integration and events playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Put record IDs in jobs instead of copies](https://agentwranglers.se/playbook/events/background-jobs-and-queues/ids-in-jobs.md)
- Next: [Run each scheduled job once at a time](https://agentwranglers.se/playbook/events/background-jobs-and-queues/single-job-runs.md)
- [Background jobs and queues](https://agentwranglers.se/playbook/events/background-jobs-and-queues.md)
