Bird
0
0

Which of the following is the correct way to create a Cloud Task with a scheduled delay in Google Cloud?

easy📝 Configuration Q12 of 15
GCP - Cloud Pub/Sub
Which of the following is the correct way to create a Cloud Task with a scheduled delay in Google Cloud?
AUse Pub/Sub with a delay attribute
BUse Cloud Tasks client and set scheduleTime to future timestamp
CSend a message to Pub/Sub and rely on subscriber delay
DCreate a Cloud Function with a timer trigger instead
Step-by-Step Solution
Solution:
  1. Step 1: Identify scheduling method in Cloud Tasks

    Cloud Tasks allows setting a scheduleTime property to delay task execution until a future timestamp.
  2. Step 2: Eliminate incorrect options

    Pub/Sub does not support scheduling messages; Cloud Functions timer triggers are separate services.
  3. Final Answer:

    Use Cloud Tasks client and set scheduleTime to future timestamp -> Option B
  4. Quick Check:

    Scheduled tasks = Cloud Tasks scheduleTime [OK]
Quick Trick: Schedule tasks with Cloud Tasks scheduleTime, not Pub/Sub [OK]
Common Mistakes:
  • Trying to delay Pub/Sub messages directly
  • Confusing Cloud Functions timers with Cloud Tasks scheduling
  • Assuming subscribers can delay message processing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes