
Cloud Workflows Scheduling: Cron and Time Zones
To run a workflow daily at 9:00 AM Eastern Time, set Cloud Scheduler to 0 9 * * * with America/New_York. The five-field cron expression sets the schedule; the time zone determines which clock it follows.
Getting the timing right is only part of the setup:
- Choose local time or UTC. Local time follows business hours; UTC avoids daylight saving shifts. Mastering these configurations is a core skill for those looking to master data engineering at a professional level.
- Connect Scheduler to Workflows. Send an HTTP POST to the Executions API using OAuth and a service account with
roles/workflows.invoker. - Test delivery and completion separately. A 2xx response means the request was accepted - not that the workflow finished.
- Plan for retries and duplicates. Check logs and make repeated requests safe so they don’t send extra emails, submit batches twice, or duplicate charges.
The steps below cover cron examples, Console and gcloud setup, daylight saving checks, and troubleshooting.
Cloud Scheduler Time Zones: Local Time vs UTC
Google Cloud Scheduler for Beginners
sbb-itb-61a6e59
2. Write Daily and Weekly Cron Schedules
Use the Scheduler job’s time zone to turn business schedules into cron expressions for the workflow trigger. Cloud Scheduler uses five-field Unix-cron expressions - there’s no seconds field.
Understand the Five Cron Fields
| Field | Valid values | Purpose |
|---|---|---|
| Minute | 0–59 |
Minute of the hour |
| Hour | 0–23 |
Hour in 24-hour time |
| Day of month | 1–31 |
Calendar day |
| Month | 1–12 or JAN–DEC |
Month of the year |
| Day of week | 0–7 or SUN–SAT |
Weekday; both 0 and 7 mean Sunday |
When both day-of-month and day-of-week are restricted, they use OR logic, not AND logic.
0 9 1 * MONruns on the first day of the month or any Monday, not only when the first is Monday.
A wildcard (*) matches every allowed value. Commas select a list, hyphens define a range that includes both endpoints, and slashes set steps.
In the day-of-week field,
1,3,5selects Monday, Wednesday, and Friday;1-5selects Monday through Friday.
Daily, Weekly, and 15-Minute Examples
Frequency Cron expression Interpretation in the job’s time zone Daily at 9:00 AM 0 9 * * *Every day at 9:00 AM; schedule reports after ingestion completes Daily at 2:00 AM 0 2 * * *Every day at 2:00 AM; check daylight saving transitions Every 15 minutes */15 * * * *At minutes 00,15,30, and45each hourMondays at 9:00 AM 0 9 * * 1Every Monday at 9:00 AM; useful for weekly data-quality checks Weekdays at 9:00 AM 0 9 * * 1-5Monday through Friday at 9:00 AM These expressions follow Cloud Scheduler’s cron syntax.
Next, use one of these expressions to create the Scheduler job. Document the schedule in plain English, including its time zone.
3. Create and Test the Scheduler Job
Set Up the Trigger in the Console
Create the trigger using the cron expression and time zone from Section 2.
In the Google Cloud console, open Workflows, select your workflow, and click Edit > Add new trigger. Choose Cloud Scheduler, enter a job name, and choose the Scheduler region. Set the cron expression and use America/New_York as the time zone. Confirm the target workflow, select the service account assigned earlier, and save the trigger.
Keep these three settings separate. The region is not part of the cron expression.
| Setting | What it controls | Where it belongs |
|---|---|---|
| Scheduler region | Where the Scheduler job resource lives | Console Region or --location |
| Workflow location | Where the target workflow is deployed | /locations/WORKFLOW_REGION/ in the Executions API URI |
| Schedule time zone | Which clock the schedule follows | Console time zone or --time-zone |
Create the Job With gcloud
First, set these variables: JOB_NAME, PROJECT_ID, SCHEDULER_REGION, WORKFLOW_REGION, WORKFLOW_NAME, and SERVICE_ACCOUNT_EMAIL.
gcloud scheduler jobs create http "$JOB_NAME" \ --project="$PROJECT_ID" \ --location="$SCHEDULER_REGION" \ --schedule='0 9 * * *' \ --time-zone='America/New_York' \ --uri="https://workflowexecutions.googleapis.com/v1/projects/${PROJECT_ID}/locations/${WORKFLOW_REGION}/workflows/${WORKFLOW_NAME}/executions" \ --http-method=POST \ --oauth-service-account-email="$SERVICE_ACCOUNT_EMAIL" \ --oauth-token-scope='https://www.googleapis.com/auth/cloud-platform' \ --headers='Content-Type=application/json' \ --message-body='{}'
This job sends a POST request to create a workflow execution. Use OAuth, not OIDC, because the target is a Google API. Set --time-zone explicitly; Cloud Scheduler uses UTC if you leave it out.
Run the Job and Check the Workflow
Use describe to check the cron expression, timeZone, target URI, and OAuth service account. Then click Run now in Cloud Scheduler or use the second command below.
gcloud scheduler jobs describe "$JOB_NAME" \ --project="$PROJECT_ID" \ --location="$SCHEDULER_REGION" gcloud scheduler jobs run "$JOB_NAME" \ --project="$PROJECT_ID" \ --location="$SCHEDULER_REGION"
Open Workflows > your workflow > Executions, confirm that a new execution appears, and inspect its outcome. Manual runs test delivery and authentication only. A 2xx response confirms delivery - not workflow completion.
If the job runs at the wrong time or doesn't run at all, check timing, permissions, and logs next.
4. Choose Between Local Time and UTC
Use an IANA time zone such as America/New_York for local business hours or UTC for fixed-clock execution. If the cron expression is right but the job runs at the wrong local hour, check the time zone next. The same expression maps to different execution times across zones. Prefer IANA names over ambiguous abbreviations such as EST: America/New_York includes both standard-time and daylight-time rules.
Match the Time Zone to the Schedule
Cloud Scheduler matches cron to the selected local clock. Choose the zone that fits the workflow’s business needs. The cron expression stays the same; only the time zone changes.
| Scheduling requirement | Recommended strategy | Daylight saving effect |
|---|---|---|
| Local business hours | Use a regional zone such as America/New_York |
Local time stays fixed; the UTC equivalent changes seasonally |
| Fixed UTC execution or cross-region coordination | Use UTC |
No seasonal shift in the scheduled UTC time |
| Elapsed-time-sensitive jobs | Use UTC plus workflow-side timing checks |
No daylight saving shift; workflow logic must validate elapsed time |
UTC does not prevent delays, retries, or duplicate runs. If elapsed time matters, record the intended execution time and check it in the workflow. Use a stable business key to prevent repeated business effects.
Local-time schedules need an extra check around daylight saving time.
Check Daylight Saving Transitions
In
America/New_York, 2:00 AM on March 8, 2026 never occurred, and 1:00 AM on November 1, 2026 occurred twice.
This affects the earlier daily 2:00 AM example and weekly schedules within a transition window. Don’t assume Scheduler will make up a skipped run or fire exactly twice during a repeated hour.
Even a daily 9:00 AM schedule can have a 23- or 25-hour gap instead of 24 hours across a transition. Test schedules in staging before, during, and after both transitions. This rigorous testing is a core skill for those breaking into data engineering. Then compare Scheduler logs with Workflows execution timestamps in UTC. Use UTC to avoid these seasonal shifts when fixed UTC timing matters more than local business hours.
5. Troubleshoot Scheduled Executions
Check Timing, Permissions, and Logs
If a schedule runs at the wrong time - or doesn’t run at all - check timing, delivery, then workflow execution, in that order.
Start with the job state, schedule, time zone, last attempt, and next run. If the next run is wrong, fix the schedule. Read the cron expression in the job’s IANA time zone, not your local time.
If the schedule is correct but Workflows never received the request, check delivery and authentication. In Scheduler logs, review the HTTP status, target URL, authentication result, and error message alongside the attempt timestamps.
Confirm that the URI matches projects/PROJECT_ID/locations/LOCATION/workflows/WORKFLOW_NAME/executions. Also check that the OAuth token uses the intended service account and that the account has roles/workflows.invoker on the workflow. The wrong URI or service account can prevent delivery. HTTP 401 or 403 usually points to an authentication or permission issue - not a failed workflow step.
A 2xx response to Scheduler proves delivery only. Find the execution ID in Workflows execution history, then inspect the failed step, API response, and logs. If an execution exists but failed, investigate the workflow itself. Check downstream permissions separately from Scheduler IAM, and compare Scheduler and Workflows timestamps in UTC. If timing and IAM look correct, check retries next.
Handle Retries and Duplicate Runs
Cloud Scheduler uses at-least-once delivery. If an acknowledgment gets lost, Scheduler can send another request even after the first attempt starts an execution.
Compare attempt timestamps and execution IDs, then review the deadline, retry count, and backoff settings. Scheduler retries failed delivery - not workflow failures after acceptance. Even retryCount=0 does not guarantee duplicate-free delivery.
Make side effects idempotent, and use durable, application-level deduplication where needed. Scheduler’s X-CloudScheduler-JobName and X-CloudScheduler-ScheduleTime headers can help identify repeated requests.
Use idempotency keys to prevent repeat requests from duplicating charges, emails, or batch submissions. Label each key as either a local business date or a UTC instant.
6. Conclusion: Verify the Schedule and Time Zone
Before approving the job, check the saved cron expression and time zone. Use a regional time zone for local business hours and UTC for fixed schedules.
Next, validate the saved job in Cloud Scheduler. Check the target, authentication, request body, and retry policy. Run one controlled test, then confirm that the expected Workflows execution appears with the matching payload.
For local schedules, test both daylight-saving boundaries in a nonproduction environment, then monitor the first scheduled run. Keep workflow actions idempotent and retry only operations that are safe to repeat.
FAQs
How do I schedule the first Monday of each month?
Use 0 0 1-7 * 1 with care: Cloud Scheduler treats the day-of-month and day-of-week fields as an OR condition. This runs the job at midnight on the first seven days of each month and every Monday, not just the first Monday.
To run only on the first Monday, use 0 0 * * 1, then have the job check the local date and proceed only if the day of the month is 1–7.
Set your preferred time zone, such as America/New_York, in Cloud Scheduler to keep the schedule aligned with local time through daylight saving time changes. Use that same time zone for the job’s date check.
How can I prevent overlapping workflow executions?
Use your orchestration tool’s concurrency controls to cap simultaneous workflow runs and tasks. When workflows share an external resource, use pools with limited slots. Make tasks idempotent so overlapping runs don’t create duplicate data.
Keep work within its scheduled interval. Use durable watermarks to track progress instead of assuming every scheduled run will execute.
How do I pass a deduplication key to my workflow?
Build a deduplication key into your task design to support idempotency. For notifications or external services such as PagerDuty, include the key in the alert metadata to manage incident escalations.
For data processing, pair stable keys with merge, upsert, or delete-and-insert logic. This keeps results the same across repeated runs, including retries.