---
title: "Spread scheduled work across the hour · Agent Wranglers"
url: https://agentwranglers.se/playbook/scaling/background-jobs-and-queues/spread-scheduled-jobs
updated: 2026-10-21
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/scaling/background-jobs-and-queues.md).

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

- ID: SCL-22
- Level: Recommended
- Chapter: [Background jobs and queues](https://agentwranglers.se/playbook/scaling/background-jobs-and-queues)
- 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.
- 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) shows. Run each once, as [Run each scheduled job once at a time](https://agentwranglers.se/playbook/scaling/background-jobs-and-queues/single-job-runs) says, and report a [heartbeat](https://agentwranglers.se/playbook/operations/alerts-and-on-call/job-heartbeats).
- 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.

## 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
```

## Related rules

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

**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/scaling/background-jobs-and-queues/spread-scheduled-jobs">Agent Wranglers scaling 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/scaling/background-jobs-and-queues/ids-in-jobs)
- Next: [Set aside messages that keep failing](https://agentwranglers.se/playbook/scaling/background-jobs-and-queues/dead-letter-queue)
- [Background jobs and queues](https://agentwranglers.se/playbook/scaling/background-jobs-and-queues)
