cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Bug Report: Incorrect “Next Run Time” Calculation for Interval Periodic Schedules

yatharth
New Contributor III

Summary
When configuring a Jobs schedule → Interval periodic trigger in Databricks, the “Next run” timestamp changes inconsistently when the interval value is modified, even though the base schedule (start time) remains the same. The next run appears to be recalculated from the current time rather than the originally selected start time.

This leads to confusing and incorrect scheduling behavior.


Feature Area
Jobs → Schedules → Interval periodic

Environment
Workspace: Databricks
Schedule Type: Interval periodic
Timezone: IST (UTC+5:30)
Start time selected: Today at 10:15 IST
Expected Behavior
Changing the interval value (5 → 7 → 8 weeks, etc.) should recalculate the next run using the same base start time (10:15 IST today).

Example expected logic:

If start time = Apr 15, 2026 10:15 IST

Then:

5 weeks → May 20, 2026 10:15 IST
7 weeks → Jun 03, 2026 10:15 IST
8 weeks → Jun 10, 2026 10:15 IST
The base timestamp should not drift.


Actual Behavior (Observed)
Step 1 — Set schedule
Schedule configured as:
Every 8 weeks, starting today at 10:15 IST

UI shows:

Every 8 weeks, next run at May 20, 2026, 05:00 AM

This seems acceptable (timezone conversion assumed).

Step 2 — Change interval to 7 weeks
UI now shows:

Every 7 weeks, next run at Apr 15, 2026, 11:54 AM

🚨 This is earlier the same day, not 7 weeks later.

Step 3 — Change interval to 5 weeks
UI shows:

Every 5 weeks, next run at May 04, 2026, 06:48 PM

Now the time has drifted again.

Step 4 — Change interval back to 8 weeks
UI shows:

Every 8 weeks, next run at May 04, 2026, 09:45 AM

🚨 The next run is now May 4, not May 20 anymore.


Reproducibility
Always reproducible when modifying interval multiple times before saving.

1 ACCEPTED SOLUTION

Accepted Solutions

Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @yatharth,

In Databricks Jobs, the scheduled trigger has two modes. Simple (also called periodic/interval) runs "Every N hours/days/weeks", whereas Advanced (cron) runs based on an explicit cron expression and timezone.

In the Simple/Periodic mode, Databricks explicitly does not let you specify the exact time of the first run. The first run time is chosen automatically when you configure the schedule. This is documented here.

job_shedule.png

After that first run, the job will run every N units from that chosen first-run time, not from the start time you picked in the UI and not from the current time.

When you create a periodic schedule (e.g., "Every 8 weeks"), and then later edit it to "Every 7 weeks", "Every 5 weeks", then back to "Every 8 weeks", each edit effectively creates a new periodic schedule. Each time, the scheduler recomputes the first run time based on when you saved that change, not based on your original start time field. That recalculated first run can land later the same day (e.g., "Next run at 11:54 AM today"), or land on a different calendar date than you expected when you go back to 8 weeks. That’s why the "Next run" appears earlier on the same day when you change 8 --> 7 weeks. When you go back to 8 weeks, "Next run" no longer matches the previous 8‑week date. You’ve effectively asked the system to pick a new first run for a new 8‑week schedule.

The start time field in the periodic UI is probably a bit misleading. It shows the effective first run in your timezone, but it is not treated as an immutable base anchor from which future runs are always recomputed. It’s a display of what the scheduler has chosen, not a fixed input that’s preserved when you edit the interval.

From your perspective (as a user), your expectation is very reasonable. You are basically saying... keep my base time fixed and change the interval. Don’t move the schedule around. However, based on the public scheduling doc above, the current behaviour is working as designed for Simple/periodic schedules. Simple schedules guarantee the interval. They do not guarantee that the first run or subsequent "Next run" values... as in stay anchored to a user‑chosen base timestamp when you change the interval.

The confusing part is mostly the UI wording and the fact that "Next run" is recomputed each time you edit, which makes it look unstable.

If you need stable, anchored timing (e.g., "exactly every 5/7/8 weeks from this base date at 10:15 IST"), there isn’t a built‑in trigger type that does that out‑of‑the‑box as of today. As a workaround, you can use advanced (cron) + a small guard in your code or accept periodic semantics and avoid edits.  This would mean using the Advanced schedule (cron) to run the job at a fixed local time (e.g., every day at 10:15 IST, or every week on a specific weekday/time). In your first task, add simple logic to read the timestamp of the last successful run (from a Delta table, a config table, or the job parameter store) and proceed only if ≥ N weeks have elapsed. Otherwise, exit quickly. This gives you a stable, predictable time-of-day and timezone (handled by cron) and true "every N weeks from this base" semantics controlled by your guard logic.

Your underlying ask... "let interval schedules honour a fixed base date/time, and keep 'Next run' anchored when changing the interval" is very reasonable UX feedback. Internally, this is treated as a feature request/enhancement rather than a scheduler bug, because the current behaviour matches the documented contract for Simple schedules ("scheduler chooses a time when you configure the schedule"). I’ll make sure this scenario and your IST example are passed along so PM/engineering can factor it into future improvements to Jobs scheduling UX.

In the meantime, for production‑critical workflows where an anchored schedule really matters, I’d recommend using Advanced (cron) + guard logic as above rather than relying on the periodic UI.

If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***

View solution in original post

2 REPLIES 2

Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @yatharth,

In Databricks Jobs, the scheduled trigger has two modes. Simple (also called periodic/interval) runs "Every N hours/days/weeks", whereas Advanced (cron) runs based on an explicit cron expression and timezone.

In the Simple/Periodic mode, Databricks explicitly does not let you specify the exact time of the first run. The first run time is chosen automatically when you configure the schedule. This is documented here.

job_shedule.png

After that first run, the job will run every N units from that chosen first-run time, not from the start time you picked in the UI and not from the current time.

When you create a periodic schedule (e.g., "Every 8 weeks"), and then later edit it to "Every 7 weeks", "Every 5 weeks", then back to "Every 8 weeks", each edit effectively creates a new periodic schedule. Each time, the scheduler recomputes the first run time based on when you saved that change, not based on your original start time field. That recalculated first run can land later the same day (e.g., "Next run at 11:54 AM today"), or land on a different calendar date than you expected when you go back to 8 weeks. That’s why the "Next run" appears earlier on the same day when you change 8 --> 7 weeks. When you go back to 8 weeks, "Next run" no longer matches the previous 8‑week date. You’ve effectively asked the system to pick a new first run for a new 8‑week schedule.

The start time field in the periodic UI is probably a bit misleading. It shows the effective first run in your timezone, but it is not treated as an immutable base anchor from which future runs are always recomputed. It’s a display of what the scheduler has chosen, not a fixed input that’s preserved when you edit the interval.

From your perspective (as a user), your expectation is very reasonable. You are basically saying... keep my base time fixed and change the interval. Don’t move the schedule around. However, based on the public scheduling doc above, the current behaviour is working as designed for Simple/periodic schedules. Simple schedules guarantee the interval. They do not guarantee that the first run or subsequent "Next run" values... as in stay anchored to a user‑chosen base timestamp when you change the interval.

The confusing part is mostly the UI wording and the fact that "Next run" is recomputed each time you edit, which makes it look unstable.

If you need stable, anchored timing (e.g., "exactly every 5/7/8 weeks from this base date at 10:15 IST"), there isn’t a built‑in trigger type that does that out‑of‑the‑box as of today. As a workaround, you can use advanced (cron) + a small guard in your code or accept periodic semantics and avoid edits.  This would mean using the Advanced schedule (cron) to run the job at a fixed local time (e.g., every day at 10:15 IST, or every week on a specific weekday/time). In your first task, add simple logic to read the timestamp of the last successful run (from a Delta table, a config table, or the job parameter store) and proceed only if ≥ N weeks have elapsed. Otherwise, exit quickly. This gives you a stable, predictable time-of-day and timezone (handled by cron) and true "every N weeks from this base" semantics controlled by your guard logic.

Your underlying ask... "let interval schedules honour a fixed base date/time, and keep 'Next run' anchored when changing the interval" is very reasonable UX feedback. Internally, this is treated as a feature request/enhancement rather than a scheduler bug, because the current behaviour matches the documented contract for Simple schedules ("scheduler chooses a time when you configure the schedule"). I’ll make sure this scenario and your IST example are passed along so PM/engineering can factor it into future improvements to Jobs scheduling UX.

In the meantime, for production‑critical workflows where an anchored schedule really matters, I’d recommend using Advanced (cron) + guard logic as above rather than relying on the periodic UI.

If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***

yatharth
New Contributor III

Thanks @Ashwin_DSA  for that detailed answer, that surely solves my query but I see this as a classic UX bug disguised as feature