gcpcloud-runserverlesscost-optimization

GCP Cloud Run jobs cost: pay for the work, nothing when idle

Cloud Run jobs bill per vCPU-second and memory-GiB-second while the job runs, with no idle cost since jobs run to completion and stop. It suits batch and scheduled work. Here is how the model works and how it differs from Cloud Run services.

The C3X Team··4 min read

Quick answer

Cloud Run jobs bill per vCPU-second and memory-GiB-second only while the job runs, with no idle cost since a job runs to completion and stops. It is ideal for batch, scheduled, and one-off tasks. Cost is resources times runtime times parallelism, so right-size CPU and memory and keep jobs efficient.

Cloud Run jobs run a container to completion for batch and scheduled work, unlike Cloud Run services which stay ready to serve requests. Because a job starts, does its work, and stops, you pay only for the resources it uses while running, with nothing in between.

Pay for runtime only

A job bills per vCPU-second and per memory-GiB-second for the duration it executes, across however many parallel tasks it runs. There is no minimum instance and no idle charge, so a job that runs for two minutes a day costs for two minutes a day. This makes jobs cheap for intermittent batch work that would waste money on an always-on service.

Jobs vs services

Cloud Run jobCloud Run service
PurposeBatch, runs to completionServe requests
Bills forRuntime onlyRequest-handling time (+ optional min instances)
Idle costNoneNone, unless minimum instances set

Use a job for work that starts, processes, and finishes (data processing, migrations, scheduled tasks) and a service for handling HTTP traffic. Running batch work as a job rather than a long-lived service avoids paying for idle capacity, the same principle as choosing between Functions and Cloud Run.

Controlling Cloud Run jobs cost

Right-size vCPU and memory to what the job needs (over-allocating both raises the per- second cost), tune task parallelism so the job finishes efficiently without wasteful over-parallelism, and make the container start fast and do its work efficiently since you pay for every second. Because there is no idle cost, the entire optimization is reducing resource-seconds.

FAQ

How are Cloud Run jobs priced?

Per vCPU-second and memory-GiB-second only while the job runs, across its parallel tasks, with no idle cost since a job runs to completion and stops. Cost is resources times runtime times parallelism, so a job that runs briefly costs little.

Do Cloud Run jobs cost anything when idle?

No. Unlike a service that can keep minimum instances warm, a job runs to completion and stops, so you pay only for the resource-seconds while it executes and nothing between runs. This makes jobs ideal for intermittent batch work.

What is the difference between Cloud Run jobs and services?

A job runs a container to completion for batch or scheduled work and bills only for its runtime. A service stays ready to serve HTTP requests and bills for request-handling time (plus optional minimum instances). Use jobs for tasks that finish, services for traffic.

How do I reduce Cloud Run jobs cost?

Right-size vCPU and memory to what the job needs, tune task parallelism so it finishes efficiently without over-parallelizing, and make the container start fast and do its work efficiently. Since there is no idle cost, the whole optimization is reducing resource-seconds.

Should I run batch work as a Cloud Run job or a service?

As a job. Batch work that starts, processes, and finishes wastes money on an always-on service but costs only its runtime as a job. Reserve services for handling ongoing HTTP traffic where readiness to serve matters.

Does C3X estimate Cloud Run cost?

Cloud Run job cost is driven by resource-seconds, a usage input tied to CPU, memory, runtime, and parallelism. C3X prices the surrounding infrastructure, and you model job resources and runtime to estimate the charge.

What to do next

Estimate the infrastructure around your batch jobs before you run them. C3X reads your Terraform and prices your resources against a live catalog. Start with the quickstart.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.