<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Guidance Required: Scheduling a Biweekly Databricks Job in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/172183#M56591</link>
    <description>&lt;P&gt;Greetings &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/263812"&gt;@pawanswami&lt;/a&gt;, I did some digging and here is what I found.&lt;/P&gt;
&lt;P&gt;Satyasai and ivy125cordes have the root cause right: Databricks schedules run on Quartz cron, and Quartz has no "every N weeks" concept. The question that decides your fix is whether you need a two-week interval, or a calendar-anchored schedule like "every other Wednesday at 9:00 local time." Those are different requirements with different solutions.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 1: Simple schedule, every 2 weeks&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This is what balajij8 showed with &lt;CODE&gt;interval: 2&lt;/CODE&gt; and &lt;CODE&gt;unit: WEEKS&lt;/CODE&gt;. Least code, and a true two-week interval. The catch, straight from the docs: you can't set the time of the first run on a Simple schedule. The scheduler picks it when you save, and the interval is anchored to that moment. So you'd create it on a Wednesday, but the time of day isn't yours to choose, and any later edit or redeploy re-anchors it. If "roughly every other Wednesday" is good enough, take this and test it after any trigger change.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 2: Weekly cron plus a gate task&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If the business expects a specific Wednesday at a specific time, schedule weekly with an Advanced schedule and let the first task decide whether this is an "on" week. That's the pattern Satyasai and ivy125cordes described, with two adjustments.&lt;/P&gt;
&lt;P&gt;First, don't key off ISO week parity (&lt;CODE&gt;week % 2&lt;/CODE&gt;). Some ISO years have 53 weeks, and 2026 is one. December 30, 2026 is week 53 and January 6, 2027 is week 1, both odd, so an odd/even check would either run two Wednesdays in a row or go three weeks dark at year end. Count from a fixed anchor Wednesday instead (Satyasai's Option B). That's deterministic across year boundaries.&lt;/P&gt;
&lt;P&gt;Second, &lt;CODE&gt;dbutils.notebook.exit()&lt;/CODE&gt; ends the task as Succeeded, so downstream tasks with the default "All succeeded" run-if condition still fire. Publish a task value from the gate and branch on it with an If/else condition task. Off-week tasks then show as Excluded in the run history, and the skip decision is visible in the DAG instead of buried in a notebook.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Schedule (shown in bundle yaml; the UI equivalent is Advanced with cron syntax):&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE class="language-yaml"&gt;schedule:
  quartz_cron_expression: "0 0 9 ? * WED"
  timezone_id: "Europe/London"   # replace with yours
  pause_status: UNPAUSED
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;&lt;STRONG&gt;Gate task (Python notebook), first in the graph:&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE class="language-python"&gt;from datetime import date, datetime
from zoneinfo import ZoneInfo

TZ = ZoneInfo("Europe/London")   # must match timezone_id above
ANCHOR = date(2026, 10, 7)       # any Wednesday that should be an "on" week
today = datetime.now(TZ).date()  # plain date.today() can be wrong near midnight UTC

should_run = (today - ANCHOR).days // 7 % 2 == 0
dbutils.jobs.taskValues.set(key="should_run", value=str(should_run).lower())
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;If/else condition task that depends on the gate, with condition &lt;CODE&gt;{{tasks.gate.values.should_run}} == true&lt;/CODE&gt;. Hang the real work off the &lt;CODE&gt;(true)&lt;/CODE&gt; branch and leave &lt;CODE&gt;(false)&lt;/CODE&gt; empty.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Tip: pass &lt;CODE&gt;ANCHOR&lt;/CODE&gt; in as a job parameter so a cadence shift is a config change, not a code change.&lt;/P&gt;
&lt;P&gt;At the end of the day, if the exact time doesn't matter, balajij8's periodic schedule is the answer. If it does, the weekly cron plus an anchored If/else gate gives you a predictable alternate-Wednesday job that survives year boundaries.&lt;/P&gt;
&lt;P&gt;References:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Run jobs on a schedule (Simple vs. Advanced, first-run time note): &lt;A href="https://docs.databricks.com/aws/en/jobs/scheduled" target="_blank"&gt;https://docs.databricks.com/aws/en/jobs/scheduled&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;If/else condition task: &lt;A href="https://docs.databricks.com/aws/en/jobs/tasks/if-else" target="_blank"&gt;https://docs.databricks.com/aws/en/jobs/tasks/if-else&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Task values: &lt;A href="https://docs.databricks.com/aws/en/jobs/task-values" target="_blank"&gt;https://docs.databricks.com/aws/en/jobs/task-values&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Run tasks conditionally (run-if rules): &lt;A href="https://docs.databricks.com/workflows/jobs/conditional-tasks.html" target="_blank"&gt;https://docs.databricks.com/workflows/jobs/conditional-tasks.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Periodic trigger example in a bundle: &lt;A href="https://docs.databricks.com/dev-tools/bundles/resource-examples.html" target="_blank"&gt;https://docs.databricks.com/dev-tools/bundles/resource-examples.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Quartz cron syntax: &lt;A href="https://www.quartz-scheduler.org/documentation/quartz-2.5.x/tutorials/tutorial-lesson-06.html" target="_blank"&gt;https://www.quartz-scheduler.org/documentation/quartz-2.5.x/tutorials/tutorial-lesson-06.html&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Regards, Louis.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2026 15:11:10 GMT</pubDate>
    <dc:creator>Louis_Frolio</dc:creator>
    <dc:date>2026-10-07T15:11:10Z</dc:date>
    <item>
      <title>Guidance Required: Scheduling a Biweekly Databricks Job</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170673#M56334</link>
      <description>&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;I’m reaching out to seek your guidance on one of our use cases where we need to schedule a &lt;STRONG&gt;biweekly Databricks job to run every alternate Wednesday&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;I explored both the standard Databricks scheduling options and cron-based scheduling, but I was unable to configure the schedule to meet this requirement reliably.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Oct 2026 01:55:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170673#M56334</guid>
      <dc:creator>pawanswami</dc:creator>
      <dc:date>2026-10-06T01:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Required: Scheduling a Biweekly Databricks Job</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170679#M56335</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/263812"&gt;@pawanswami&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The limitation you ran into is due to the underlying scheduling engine: Databricks uses Quartz Cron, which does not support "every 2 weeks" (n-week intervals) natively. A cron expression like 0 0 9 ? * WED will run every Wednesday, not every alternate Wednesday.&lt;/P&gt;&lt;P&gt;To handle alternate Wednesday scheduling reliably in Databricks Workflows, I use to work with below solution&lt;/P&gt;&lt;P&gt;Schedule Weekly + Early Exit Guard&lt;BR /&gt;You set the job schedule to run every Wednesday, but the first task in your workflow checks the ISO week number and stops execution if it is an "off" week.Step 1 Create a Check_Schedule TaskAdd a lightweight Python notebook/script task as the first step in your workflow Python import datetime&lt;/P&gt;&lt;P&gt;import sys&lt;/P&gt;&lt;P&gt;# Get current ISO week number (1 - 53)&lt;BR /&gt;current_week = datetime.datetime.now().isocalendar().week&lt;/P&gt;&lt;P&gt;# Option A: Even weeks vs. Odd weeks&lt;BR /&gt;is_run_week = (current_week % 2 == 0)&lt;/P&gt;&lt;P&gt;# Option B: Calculate from a fixed reference Wednesday (e.g., Jan 7, 2026)&lt;BR /&gt;# ref_date = datetime.datetime(2026, 1, 7)&lt;BR /&gt;# weeks_since_ref = (datetime.datetime.now() - ref_date).days // 7&lt;BR /&gt;# is_run_week = (weeks_since_ref % 2 == 0)&lt;/P&gt;&lt;P&gt;if not is_run_week:&lt;BR /&gt;print("Skipping execution: Current week is an off-week.")&lt;BR /&gt;# Exit task gracefully so downstream tasks do not run&lt;BR /&gt;dbutils.notebook.exit("SKIPPED_OFF_WEEK")&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2026 04:19:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170679#M56335</guid>
      <dc:creator>Satyasai</dc:creator>
      <dc:date>2026-10-06T04:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Required: Scheduling a Biweekly Databricks Job</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170689#M56338</link>
      <description>&lt;P&gt;Standard cron expressions do not natively support alternating weeks, which is why Databricks' built-in scheduler cannot handle biweekly jobs directly. To resolve this, configure your job to run every Wednesday using cron (0 0 12 ? * WED) and insert a conditional check at the start of your script or notebook (such as evaluating whether the current week number is even or odd) to execute the workflow only on alternating weeks. You can verify this configuration was successful by checking your Databricks job run logs on consecutive Wednesdays to confirm it correctly alternates between executing and skipping.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2026 06:04:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170689#M56338</guid>
      <dc:creator>ivy125cordes</dc:creator>
      <dc:date>2026-10-06T06:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Required: Scheduling a Biweekly Databricks Job</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170691#M56340</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250064"&gt;@Satyasai&lt;/a&gt;&amp;nbsp;that was really helpful. thanks&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2026 06:21:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170691#M56340</guid>
      <dc:creator>pawanswami</dc:creator>
      <dc:date>2026-10-06T06:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Required: Scheduling a Biweekly Databricks Job</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170700#M56342</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/263812"&gt;@pawanswami&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can set the schedule in the DAB for the task and start the pipeline on Wednesday. You can set the&amp;nbsp;&lt;STRONG&gt;periodic trigger&lt;/STRONG&gt; configured below (&lt;STRONG&gt;interval 2 unit WEEKS&lt;/STRONG&gt;) to achieve the biweekly scheduling. You can try to un pause the job on a Wednesday and it will run every 2 weeks on Wednesdays from that point forward. You can also achieve it in a notebook to manage the scheduling.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  jobs:
    jobs_t:
      name: job_t
      trigger:
        pause_status: PAUSED
        periodic:
          interval: 2
          unit: WEEKS
      tasks:
        - task_key: run_notebook
          notebook_task:
            notebook_path: /Users/biweekly_wednesday
            source: WORKSPACE&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2026 08:14:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170700#M56342</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-10-06T08:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Required: Scheduling a Biweekly Databricks Job</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170729#M56346</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/263812"&gt;@pawanswami&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did a quick bundle validation of both options - periodic Trigger and Scheduled Trigger.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With a Periodic Trigger:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;trigger:
  pause_status: UNPAUSED
  periodic:
    interval: 2
    unit: WEEKS&lt;/LI-CODE&gt;&lt;P&gt;Databricks created an “Every 2 weeks” schedule, but the exact first run time was chosen automatically when the schedule was created. In my test the UI showed a specific next-run date/time (as below) that I had not configured anywhere in the bundle&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="periodic_time.png" style="width: 421px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/31774iF1825378D6959541/image-size/large?v=v2&amp;amp;px=999" role="button" title="periodic_time.png" alt="periodic_time.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So this is a good fit when the requirement is simply “run every 2 weeks” and the exact weekday/time does not matter. It is interval-based rather than calendar-based, and there are no fields to specify Wednesday, 09:00, or a timezone.&lt;/P&gt;&lt;P&gt;&lt;U&gt;I also tested how the periodic trigger behaves on bundle updates:&lt;/U&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;Redeploy with no trigger change&lt;/EM&gt;: next-run timestamp stayed the same.&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Changed 2 WEEKS to 3 WEEKS:&lt;/EM&gt; Databricks recalculated the next run.&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Changed back 3 WEEKS to 2 WEEKS&lt;/EM&gt;: it recalculated again to a different timestamp than the original one.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So editing the periodic trigger can effectively re-anchor the schedule. That makes periodic suitable for “&lt;EM&gt;every N weeks&lt;/EM&gt;,” but not ideal for a strict calendar requirement like “alternate Wednesdays at 09:00 Europe/London&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With Cron Schedule:&amp;nbsp;&lt;/STRONG&gt;If the requirement is strictly “every other Wednesday at 09:00 Europe/London”, can use&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;schedule:
  quartz_cron_expression: "0 0 9 ? * WED"
  timezone_id: "Europe/London"
  pause_status: UNPAUSED&lt;/LI-CODE&gt;&lt;P&gt;and then use a small first task referring a notebook to calculate whether this Wednesday is part of the 14-day cadence from a fixed reference Wednesday (like below):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from datetime import date

reference = date(2026, 10, 7)
today = date.today()

should_run = (
    today &amp;gt;= reference
    and (today - reference).days % 14 == 0
)

dbutils.jobs.taskValues.set(
    key="should_run",
    value=str(should_run).lower()
)&lt;/LI-CODE&gt;&lt;P&gt;Then configure the If/else condition to evaluate and run the task. For the bundle file, it looks mostly like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;schedule:
  quartz_cron_expression: "0 0 9 ? * WED"
  timezone_id: "Europe/London"
  pause_status: UNPAUSED

tasks:
  - task_key: check_biweekly_date
    spark_python_task:
      python_file: jobs/check_biweekly.py
    environment_key: default

  - task_key: is_biweekly_run
    depends_on:
      - task_key: check_biweekly_date
    condition_task:
      op: EQUAL_TO
      left: "{{tasks.check_biweekly_date.values.should_run}}"
      right: "true"

  - task_key: actual_processing
    depends_on:
      - task_key: is_biweekly_run
        outcome: "true"
    spark_python_task:
      python_file: jobs/process.py
    environment_key: default&lt;/LI-CODE&gt;&lt;P&gt;This looks cleaner than embedding skip logic inside the processing notebook, because the Jobs UI clearly shows whether that Wednesday was a run or skip.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2026 11:23:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170729#M56346</guid>
      <dc:creator>data_pulse</dc:creator>
      <dc:date>2026-10-06T11:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Required: Scheduling a Biweekly Databricks Job</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170736#M56347</link>
      <description>&lt;P&gt;Databricks schedules use Quartz cron, which has no way to say "every 14 days". Cron fields only match calendar positions (day-of-week, day-of-month), so you can't alternate weeks reliably. Patterns like 1,15,29 on days of the month drift and break at month boundaries.&lt;/P&gt;&lt;P&gt;Recommended: run weekly, skip alternate weeks with a gate task&lt;/P&gt;&lt;P&gt;Schedule the job every Wednesday, and add a first task that decides whether this is an "on" week. Downstream tasks run only if it says yes.&lt;/P&gt;&lt;P&gt;1. Schedule weekly (Quartz cron):&lt;/P&gt;&lt;P&gt;yaml&lt;BR /&gt;schedule:&lt;BR /&gt;quartz_cron_expression: "0 0 6 ? * WED *" # every Wednesday 06:00&lt;BR /&gt;timezone_id: "Asia/Kolkata" # set to your timezone&lt;BR /&gt;pause_status: UNPAUSED&lt;/P&gt;&lt;P&gt;2. Gate notebook (check_week): use an anchor date instead of ISO week numbers, since ISO week parity breaks at year boundaries (52/53-week years):&lt;/P&gt;&lt;P&gt;python&lt;BR /&gt;from datetime import date&lt;/P&gt;&lt;P&gt;ANCHOR = date(2026, 10, 7) # a Wednesday that SHOULD run; change as needed&lt;BR /&gt;weeks_since = (date.today() - ANCHOR).days // 7&lt;BR /&gt;should_run = (weeks_since % 2 == 0)&lt;/P&gt;&lt;P&gt;dbutils.jobs.taskValues.set(key="should_run", value=str(should_run).lower())&lt;/P&gt;&lt;P&gt;3. Wire it up with a condition task:&lt;/P&gt;&lt;P&gt;yaml&lt;BR /&gt;tasks:&lt;BR /&gt;- task_key: check_week&lt;BR /&gt;notebook_task:&lt;BR /&gt;notebook_path: jobs/base/CHECK_WEEK&lt;BR /&gt;source: GIT&lt;/P&gt;&lt;P&gt;- task_key: is_run_week&lt;BR /&gt;depends_on:&lt;BR /&gt;- task_key: check_week&lt;BR /&gt;condition_task:&lt;BR /&gt;op: EQUAL_TO&lt;BR /&gt;left: "{{tasks.check_week.values.should_run}}"&lt;BR /&gt;right: "true"&lt;/P&gt;&lt;P&gt;- task_key: main_processing&lt;BR /&gt;depends_on:&lt;BR /&gt;- task_key: is_run_week&lt;BR /&gt;outcome: "true"&lt;BR /&gt;notebook_task:&lt;BR /&gt;notebook_path: jobs/base/MAIN_PROCESSING&lt;BR /&gt;source: GIT&lt;/P&gt;&lt;P&gt;On "off" weeks, main_processing is shown as excluded and the run finishes successfully, with no failure alerts. The gate adds only a few seconds of compute, and you can run it on a small job cluster.&lt;/P&gt;&lt;P&gt;Alternative options&lt;/P&gt;&lt;P&gt;Databricks periodic trigger (trigger.periodic with interval: 2, unit: WEEKS). It does repeat every 2 weeks, but it isn't anchored to a weekday or time. It counts from when the job is created or saved, so you'd have to deploy it on the right Wednesday. Redeploying or editing the job can shift the cycle, so it's fragile in production.&lt;/P&gt;&lt;P&gt;Azure Data Factory (since you already use it). A Schedule trigger supports frequency: Week, interval: 2, weekDays: ["Wednesday"], with a startTime on the first run date. ADF then calls the Databricks job via the Jobs API or a Databricks activity. This is clean if ADF is already your orchestrator.&lt;/P&gt;&lt;P&gt;Two separate jobs or schedules: some teams use cron on specific dates, like 0 0 6 1,15,29 * ?, but this is not actually alternate Wednesdays and I don't recommend it.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2026 13:08:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/170736#M56347</guid>
      <dc:creator>aayush_410</dc:creator>
      <dc:date>2026-10-06T13:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Required: Scheduling a Biweekly Databricks Job</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/172183#M56591</link>
      <description>&lt;P&gt;Greetings &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/263812"&gt;@pawanswami&lt;/a&gt;, I did some digging and here is what I found.&lt;/P&gt;
&lt;P&gt;Satyasai and ivy125cordes have the root cause right: Databricks schedules run on Quartz cron, and Quartz has no "every N weeks" concept. The question that decides your fix is whether you need a two-week interval, or a calendar-anchored schedule like "every other Wednesday at 9:00 local time." Those are different requirements with different solutions.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 1: Simple schedule, every 2 weeks&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This is what balajij8 showed with &lt;CODE&gt;interval: 2&lt;/CODE&gt; and &lt;CODE&gt;unit: WEEKS&lt;/CODE&gt;. Least code, and a true two-week interval. The catch, straight from the docs: you can't set the time of the first run on a Simple schedule. The scheduler picks it when you save, and the interval is anchored to that moment. So you'd create it on a Wednesday, but the time of day isn't yours to choose, and any later edit or redeploy re-anchors it. If "roughly every other Wednesday" is good enough, take this and test it after any trigger change.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 2: Weekly cron plus a gate task&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If the business expects a specific Wednesday at a specific time, schedule weekly with an Advanced schedule and let the first task decide whether this is an "on" week. That's the pattern Satyasai and ivy125cordes described, with two adjustments.&lt;/P&gt;
&lt;P&gt;First, don't key off ISO week parity (&lt;CODE&gt;week % 2&lt;/CODE&gt;). Some ISO years have 53 weeks, and 2026 is one. December 30, 2026 is week 53 and January 6, 2027 is week 1, both odd, so an odd/even check would either run two Wednesdays in a row or go three weeks dark at year end. Count from a fixed anchor Wednesday instead (Satyasai's Option B). That's deterministic across year boundaries.&lt;/P&gt;
&lt;P&gt;Second, &lt;CODE&gt;dbutils.notebook.exit()&lt;/CODE&gt; ends the task as Succeeded, so downstream tasks with the default "All succeeded" run-if condition still fire. Publish a task value from the gate and branch on it with an If/else condition task. Off-week tasks then show as Excluded in the run history, and the skip decision is visible in the DAG instead of buried in a notebook.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Schedule (shown in bundle yaml; the UI equivalent is Advanced with cron syntax):&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE class="language-yaml"&gt;schedule:
  quartz_cron_expression: "0 0 9 ? * WED"
  timezone_id: "Europe/London"   # replace with yours
  pause_status: UNPAUSED
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;&lt;STRONG&gt;Gate task (Python notebook), first in the graph:&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE class="language-python"&gt;from datetime import date, datetime
from zoneinfo import ZoneInfo

TZ = ZoneInfo("Europe/London")   # must match timezone_id above
ANCHOR = date(2026, 10, 7)       # any Wednesday that should be an "on" week
today = datetime.now(TZ).date()  # plain date.today() can be wrong near midnight UTC

should_run = (today - ANCHOR).days // 7 % 2 == 0
dbutils.jobs.taskValues.set(key="should_run", value=str(should_run).lower())
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;If/else condition task that depends on the gate, with condition &lt;CODE&gt;{{tasks.gate.values.should_run}} == true&lt;/CODE&gt;. Hang the real work off the &lt;CODE&gt;(true)&lt;/CODE&gt; branch and leave &lt;CODE&gt;(false)&lt;/CODE&gt; empty.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Tip: pass &lt;CODE&gt;ANCHOR&lt;/CODE&gt; in as a job parameter so a cadence shift is a config change, not a code change.&lt;/P&gt;
&lt;P&gt;At the end of the day, if the exact time doesn't matter, balajij8's periodic schedule is the answer. If it does, the weekly cron plus an anchored If/else gate gives you a predictable alternate-Wednesday job that survives year boundaries.&lt;/P&gt;
&lt;P&gt;References:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Run jobs on a schedule (Simple vs. Advanced, first-run time note): &lt;A href="https://docs.databricks.com/aws/en/jobs/scheduled" target="_blank"&gt;https://docs.databricks.com/aws/en/jobs/scheduled&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;If/else condition task: &lt;A href="https://docs.databricks.com/aws/en/jobs/tasks/if-else" target="_blank"&gt;https://docs.databricks.com/aws/en/jobs/tasks/if-else&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Task values: &lt;A href="https://docs.databricks.com/aws/en/jobs/task-values" target="_blank"&gt;https://docs.databricks.com/aws/en/jobs/task-values&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Run tasks conditionally (run-if rules): &lt;A href="https://docs.databricks.com/workflows/jobs/conditional-tasks.html" target="_blank"&gt;https://docs.databricks.com/workflows/jobs/conditional-tasks.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Periodic trigger example in a bundle: &lt;A href="https://docs.databricks.com/dev-tools/bundles/resource-examples.html" target="_blank"&gt;https://docs.databricks.com/dev-tools/bundles/resource-examples.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Quartz cron syntax: &lt;A href="https://www.quartz-scheduler.org/documentation/quartz-2.5.x/tutorials/tutorial-lesson-06.html" target="_blank"&gt;https://www.quartz-scheduler.org/documentation/quartz-2.5.x/tutorials/tutorial-lesson-06.html&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Regards, Louis.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2026 15:11:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-required-scheduling-a-biweekly-databricks-job/m-p/172183#M56591</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2026-10-07T15:11:10Z</dc:date>
    </item>
  </channel>
</rss>

