Schedule a Recurring Cloud Scheduler Job That Publishes to Pub/Sub
Intermediate · 30 minutes · 5 tasks, checked automatically · 100 points
In this lab you will wire together two GCP messaging services — Cloud Pub/Sub and Cloud Scheduler — entirely on a local emulator. You will create a Pub/Sub topic and subscription, then create a Cloud Scheduler job that fires on a cron schedule and delivers a message payload to that topic. Finally you will pull the subscription to confirm the scheduled message arrived. No real GCP account or billing is required; everything runs inside the floci local sandbox.
What you’ll learn
- Create a Pub/Sub topic and a pull subscription to receive scheduled messages
- Create a Cloud Scheduler job with a cron schedule that targets the Pub/Sub topic
- Manually trigger the Scheduler job and verify the message is delivered to the subscription
How this lab works
- Start the lab: One click starts an emulated cloud on your computer, with the cloud’s own CLI ready: no account and no bill.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work reads the emulated cloud’s resources and says, task by task, what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: An emulated cloud on your computer: no cloud account, no bill
- Cloud: GCP
- Services: pubsub, scheduler
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop (or Podman / Rancher Desktop) installed and running
- A GCP sandbox created in the Local Cloud Playground
Topics: pubsub, scheduler, cron, messaging, event-driven, gcp, emulator
Create a free account to start this lab.
Keep going
- Provision S3 and DynamoDB from a Single CloudFormation Stack
- Push and Pull a Container Image with Azure Container Registry
- Publish Custom CloudWatch Metrics and Raise an Alarm
- Run a Container Task on ECS with a Task Definition and Inspect Its Logs
- Split-Horizon DNS with Route 53 Public and Private Hosted Zones
- Create Your First S3 Bucket and Upload an Object