# A job that runs for hours

> A nightly import, report or migration longer than 15 minutes. Nicolas Dao's picks for this job (Cloudless Labs, Sydney), in order of preference, what he would avoid, and what to use instead.

- Use case 8 of 21 in The Stack, last reviewed 21 October 2026
- Web page: https://cloudlesslabs.com/stack/use-cases/long-job/

Picks, in order of preference:

1. **[Fargate scheduled tasks](https://cloudlesslabs.com/stack/aws-fargate-scheduled-tasks/index.md)** (Use when it fits): Runs only while the job runs, billed per second. Spot if it can restart.
2. **[Amazon EventBridge](https://cloudlesslabs.com/stack/aws-eventbridge/index.md)** (My default): Scheduler starts the task, with time zones.

Don't:

- ~~Lambda container images~~: Not a workaround for long jobs: a container image still stops at Lambda's 15 minutes, with worse cold starts. If it needs a container and hours, run it on Fargate. Instead: [Fargate scheduled tasks](https://cloudlesslabs.com/stack/aws-fargate-scheduled-tasks/index.md).

## The picks in brief

- [Fargate scheduled tasks](https://cloudlesslabs.com/stack/aws-fargate-scheduled-tasks/index.md): Use when it fits. Containers that run only while the job runs. The answer for a two-hour nightly job. Pricing: Per second of vCPU and memory while the task runs (one-minute minimum). Nothing between runs. Fargate Spot is cheaper if the job can be interrupted. Sydney, ARM: $0.03885 per vCPU-hour and $0.00426 per GB-hour; x86: $0.04856 and $0.00532. A two-hour nightly run on 2 vCPU and 4 GB (ARM) is about $5.70 a month, against about $69 for the same task left running all month. 20 GB of disk is included.
- [Amazon EventBridge](https://cloudlesslabs.com/stack/aws-eventbridge/index.md): My default. The event bus and scheduler I use all the time. Pricing: Classic bus: AWS management events are ingested free; custom events $1 per million (billed in 64 KB chunks). Scheduler: 14 million invocations a month free, then $1.20 per million in Sydney. Pipes: $0.40 per million requests. The new Custom Event Bus (September 2026) bills by data instead: in Sydney $0.19 per GB ingested (first 5 TB) and $0.058 per GB delivered to each subscriber.

## Related

- [Compute](https://cloudlesslabs.com/stack/layers/compute/index.md): every tool in this layer
- [APIs, queues and events](https://cloudlesslabs.com/stack/layers/api-events/index.md): every tool in this layer
- [Every use case and tool in one file](https://cloudlesslabs.com/stack/brief.md)
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
