Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cron Job Scheduler no longer accepts range values

Greetings!

This morning I went to update a schedule for a workflow configuration and was met with an error that my cron job schedule was no longer valid. This is despite the fact it's been functioning without issue since its inception 12 months ago.

Error message:

DataEngineer_0-1734367022773.png

This schedule is even the exact example used in the documentation hyperlinked in the above screenshot - "unix-cron" (https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules#defining_the_job_schedule)

DataEngineer_1-1734367096545.png

So I'm at a loss for words.

0 1 159
1 REPLY 1

Hi @DataEngineer,

Welcome to the Google Cloud Community!

The error message that you encountered indicates that Cloud Scheduler might have updated its validation rules, making them stricter for cron expressions.

Here are a few suggestions that could help resolve your issue:

  • Instead of using ‘/’ within the range, you might use a comma to express this as a list of explicit times in the hours field. You might try this ‘0 0,2,4,6,8,10,12 * * *
  • Regularly review the release notes of the Cloud Scheduler to stay updated about any changes to cron expression support. This will help you prevent potential issues in the future.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.