Bird
0
0

You want to chain two Cloud Run jobs where the second job runs only if the first job succeeds. Which approach best implements this?

hard📝 Application Q9 of 15
GCP - Cloud Run
You want to chain two Cloud Run jobs where the second job runs only if the first job succeeds. Which approach best implements this?
ASet max-retries=0 on the first job to automatically start the second
BCreate a single job with both tasks combined in one container
CUse Cloud Scheduler to trigger the second job on first job success
DUse the 'gcloud beta run jobs chain' command to link jobs
Step-by-Step Solution
Solution:
  1. Step 1: Understand job chaining in Cloud Run

    Cloud Run jobs do not natively support chaining; external orchestration like Cloud Scheduler is used.
  2. Step 2: Evaluate options

    Use Cloud Scheduler to trigger the second job on first job success correctly uses Cloud Scheduler to trigger the second job after success. Set max-retries=0 on the first job to automatically start the second misuses max-retries. Create a single job with both tasks combined in one container combines tasks but does not chain jobs. Use the 'gcloud beta run jobs chain' command to link jobs is invalid as no such command exists.
  3. Final Answer:

    Use Cloud Scheduler to trigger the second job on first job success -> Option C
  4. Quick Check:

    Job chaining needs external triggers like Cloud Scheduler [OK]
Quick Trick: Use Cloud Scheduler to chain Cloud Run jobs [OK]
Common Mistakes:
  • Expecting native job chaining support
  • Misusing max-retries for chaining
  • Assuming a 'chain' command exists

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes