Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Why are my scheduled executions running even outside the cron-defined time frame?

Hi, 

I use time-based tagging to trigger a set of workflows in Dataform. I just noticed that it runs even outside of the timeframe defined in cron.

My workflow configuration with the "10m_oh" tag should run every 10 minutes during office hours, with the last run at 6:50 PM.
Screenshot 2024-10-02 at 21.49.19.png

However, in the logs, I noticed that this specific workflow "10m_oh" actually runs every 10 minutes even outside of the specified hours.
Screenshot 2024-10-02 at 21.41.59.png

It's unclear when this started, but it might have been happening for months. The unwanted cost related to this bug is unknown at this point.

What am I missing?

Solved Solved
0 2 269
1 ACCEPTED SOLUTION

Hi,

If you look at the image, the cron is correctly configured.
But it seems to be a time zone issue, the cron needs to be defined in utc. 

View solution in original post

2 REPLIES 2

Hi @JFrentz,

Welcome to Google Cloud Community!

Your workflow is running outside of office hours because your cron job might be set to run every 10 minutes, regardless of the time of day. The "10m_oh" tag doesn't control when the workflow runs, only what happens within a run. 

To limit executions to office hours, adjust your cron expression to include the specific time range, like 0,10,20,30,40,50 9-18 * * 1-5 (for 9 am to 6:50 pm, Monday to Friday).

Here are some references that might be helpful to you:

Note: If you disable the Cloud Scheduler API while a running job is scheduled and then re-enable it later, any job that failed to run in the interim runs immediately, and not at the next scheduled time. 

I hope the above information is helpful.

Hi,

If you look at the image, the cron is correctly configured.
But it seems to be a time zone issue, the cron needs to be defined in utc.