GCP Associate Cloud Engineer Practice Question 73: Cloud Run Jobs Batch Task
Google Cloud Associate Cloud Engineer · Test 8 · question 3 of 10
A developer has containerized a nightly report generation task. The container reads data, produces a PDF, uploads it to Cloud Storage, and exits; it never listens for incoming HTTP requests. The developer wants to run this container on a schedule without managing servers and without writing an HTTP server into the image. What should they use?
Show answer and explanation
Answer:
A Cloud Run job executes a container to completion and then stops; it is built for exactly this kind of run once, do the work, exit workload and does not need to expose an HTTP endpoint. Cloud Scheduler can invoke it on a nightly cadence, and there is no server to manage.
Option B, a Cloud Run service, expects the container to listen on a port and respond to requests; a batch task with no HTTP server does not fit that model even with min instances at 0. Option C works but requires managing an instance group, an image build for a VM, and manual scaling logic, far more operational overhead than a serverless job. Option D would require restructuring the container around an event driven function signature and Cloud Functions is not designed for long running batch container tasks in the same way a Cloud Run job is.
Reference: Jobs overview | Cloud Run Documentation