0
0
GCPcloud~20 mins

Cloud Scheduler for cron jobs in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
πŸŽ–οΈ
Cloud Scheduler Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate
2:00remaining
Understanding Cloud Scheduler Job Execution Frequency

You create a Cloud Scheduler job with the cron expression 0 9 * * 1-5. What is the behavior of this job?

AThe job runs every day at 9:00 AM, Monday through Friday.
BThe job runs every hour from 9 AM to 5 PM on weekdays.
CThe job runs every minute on weekdays at 9 AM.
DThe job runs only once at 9 AM on Monday.
Attempts:
2 left
πŸ’‘ Hint

Recall how cron expressions define minutes, hours, and days of the week.

❓ Configuration
intermediate
2:00remaining
Configuring Cloud Scheduler to Trigger a Pub/Sub Topic

You want a Cloud Scheduler job to publish a message to a Pub/Sub topic every hour. Which configuration is required in the job's target settings?

ASet the target type to HTTP and provide the Pub/Sub topic URL.
BSet the target type to Pub/Sub and specify the topic name and message body.
CSet the target type to App Engine and specify the topic name.
DSet the target type to Cloud Function and specify the topic name.
Attempts:
2 left
πŸ’‘ Hint

Cloud Scheduler supports direct Pub/Sub targets.

❓ security
advanced
2:00remaining
Ensuring Least Privilege for Cloud Scheduler Job Permissions

You have a Cloud Scheduler job that triggers a Cloud Function. What is the best practice to ensure the job has the least privilege needed?

AGrant the Cloud Scheduler service account the 'Owner' role on the Cloud Function.
BGrant the Cloud Scheduler service account the 'Editor' role on the entire project.
CGrant the Cloud Scheduler service account the 'Cloud Functions Invoker' role only on the specific function.
DNo permissions are needed because Cloud Scheduler can invoke any function by default.
Attempts:
2 left
πŸ’‘ Hint

Think about the principle of least privilege and role scopes.

❓ Architecture
advanced
2:00remaining
Designing a Reliable Retry Strategy for Cloud Scheduler Jobs

You have a Cloud Scheduler job that triggers an HTTP endpoint. Sometimes the endpoint is temporarily unavailable. Which retry configuration ensures the job retries with exponential backoff up to 5 attempts?

ASet max retry attempts to 5 and enable exponential backoff in the retry policy.
BSet max retry attempts to 5 with fixed interval retries every 10 seconds.
CSet max retry attempts to unlimited with no backoff.
DDisable retries and rely on manual reruns.
Attempts:
2 left
πŸ’‘ Hint

Exponential backoff helps reduce load during outages.

βœ… Best Practice
expert
3:00remaining
Optimizing Cloud Scheduler for Multi-Region High Availability

You want to ensure a Cloud Scheduler job triggers reliably even if one region fails. What is the best architecture to achieve multi-region high availability?

ADeploy a single Cloud Scheduler job in the default region and rely on Google’s internal failover.
BSchedule jobs only in the region closest to your users to reduce latency.
CUse Cloud Scheduler with a global setting that automatically replicates jobs across regions.
DDeploy identical Cloud Scheduler jobs in multiple regions with the same schedule and use a deduplication mechanism downstream.
Attempts:
2 left
πŸ’‘ Hint

Cloud Scheduler jobs are regional; think about redundancy strategies.