GCPCloud SchedulerCloud8 min read

GCP Cloud Scheduler: Cron Job Guide for Google Cloud

Google Cloud Scheduler is a fully managed, enterprise-grade cron job service that runs reliably on Google Cloud infrastructure. It uses standard unix-cron syntax and natively supports timezones — here's everything you need to know.

Cloud Scheduler Key Facts

Cron Format

Standard 5-field

MIN HOUR DOM MON DOW

Min Interval

1 minute

More frequent = use Pub/Sub

Timezone

IANA supported

e.g., America/New_York

Cron Syntax

Cloud Scheduler accepts standard 5-field unix-cron expressions — the same format used in Linux crontab. It also supports the @ macros below.

MIN HOUR DOM MON DOW

Minute

0–59

Hour

0–23

Day of Month

1–31

Month

1–12

Day of Week

0–6 (Sun=0)

Supported @ Macros

@yearlyOnce a year, Jan 1st midnight
@monthlyOnce a month, 1st at midnight
@weeklyOnce a week, Sunday midnight
@dailyOnce a day at midnight
@hourlyOnce an hour at minute 0

Three Target Types

HTTP target

Invoke any publicly accessible URL — Cloud Run, Cloud Functions, App Engine, or external webhooks.

gcloud scheduler jobs create http my-job \
  --schedule="0 9 * * 1-5" \
  --uri="https://my-service.run.app/task" \
  --http-method=POST \
  --time-zone="America/New_York"

Pub/Sub target

Publish a message to a Pub/Sub topic. Great for fan-out patterns and decoupled microservices.

gcloud scheduler jobs create pubsub my-pubsub-job \
  --schedule="0 */6 * * *" \
  --topic=my-topic \
  --message-body='{"event":"daily-sync"}' \
  --time-zone="UTC"

App Engine target

Call an App Engine HTTP handler. Use when your workload already runs on App Engine.

gcloud scheduler jobs create app-engine my-ae-job \
  --schedule="30 3 * * *" \
  --relative-url="/tasks/cleanup" \
  --service=default \
  --version=prod

Common Patterns

ScheduleCron Expression
Every day at midnight UTC0 0 * * *
Every 5 minutes*/5 * * * *
Every weekday at 9 AM0 9 * * 1-5
First of month at 2 AM0 2 1 * *
Every hour on the hour0 * * * *
Every Sunday at 6 AM0 6 * * 0
Last day of month (approx)0 0 28-31 * *
Every 15 min on weekdays*/15 * * * 1-5

Timezone Support

Cloud Scheduler natively supports IANA timezone names. Specify the timezone when creating or updating a job — all cron expressions are interpreted in that timezone.

# Run at 9 AM New York time, every weekday

gcloud scheduler jobs create http morning-report \
  --schedule="0 9 * * 1-5" \
  --uri="https://my-service.run.app/report" \
  --time-zone="America/New_York" \
  --location="us-east1"
America/New_York

US Eastern (UTC-5/4)

America/Los_Angeles

US Pacific (UTC-8/7)

Europe/London

UK (UTC+0/1)

Europe/Berlin

Central Europe (UTC+1/2)

Asia/Tokyo

Japan (UTC+9)

Asia/Seoul

Korea (UTC+9)

App Engine cron.yaml

If you use App Engine, you can define scheduled tasks directly in cron.yaml. This uses a slightly different syntax — English-language descriptors, not standard cron fields.

# cron.yaml — App Engine scheduled tasks

cron:
- description: "Daily report"
  url: /tasks/daily-report
  schedule: every 24 hours
  timezone: America/New_York

- description: "Weekly cleanup"
  url: /tasks/cleanup
  schedule: every monday 03:00
  timezone: UTC

- description: "Hourly sync"
  url: /tasks/sync
  schedule: every 1 hours
Tip: Deploy cron.yaml with gcloud app deploy cron.yaml. The schedule uses plain English — not standard cron — which is more readable but less flexible.

Common Gotchas

Job delivery is at-least-once

Cloud Scheduler guarantees delivery but may occasionally trigger a job more than once. Make your handlers idempotent.

HTTP target must respond within 3 minutes

If your target takes longer, use a Pub/Sub topic and process asynchronously in a background worker or Cloud Run job.

📍

Location matters for latency

Create the scheduler job in the same region as your target (e.g., us-central1 for Cloud Run in us-central1) to minimize invocation latency.

💰

Free tier: 3 jobs max

The Cloud Scheduler free tier allows up to 3 jobs per month per project. Beyond that, pricing is ~$0.10/job/month.

Convert Linux cron to Cloud Scheduler format

Cloud Scheduler uses standard 5-field cron — test and validate your expressions with our free tools.