<?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 Set a theshold Notification on Job run time. in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/set-a-theshold-notification-on-job-run-time/m-p/152258#M11592</link>
    <description>&lt;P&gt;Hello all, I am brand new to Databricks, so forgive me if this question has been answered before,&amp;nbsp; but what i want to do is set a run time threshold to my Databricks Jobs such that if the job which say normally runs for 30 minutes, runs for over an hour,&amp;nbsp; then i get an email notification.&lt;/P&gt;&lt;P&gt;I have found the Job-Notifications section within the Databricks Job, and I can set it there in the UI. But according to CoPilot, I cannot programmatically set this and as soon as i do a code deploy/rebuild,&amp;nbsp; the values will get removed.&lt;/P&gt;&lt;P&gt;Is it true that I can't set these through code and that any manual set is wiped out?&lt;/P&gt;&lt;P&gt;It seems a bit weird to me as it kind of makes the Ui ability worthless? I have weekly deploys by the way which would mean a manual set every week if the above is true.&amp;nbsp; Cheers all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Mar 2026 08:52:51 GMT</pubDate>
    <dc:creator>rwalrondNHS</dc:creator>
    <dc:date>2026-03-27T08:52:51Z</dc:date>
    <item>
      <title>Set a theshold Notification on Job run time.</title>
      <link>https://community.databricks.com/t5/get-started-discussions/set-a-theshold-notification-on-job-run-time/m-p/152258#M11592</link>
      <description>&lt;P&gt;Hello all, I am brand new to Databricks, so forgive me if this question has been answered before,&amp;nbsp; but what i want to do is set a run time threshold to my Databricks Jobs such that if the job which say normally runs for 30 minutes, runs for over an hour,&amp;nbsp; then i get an email notification.&lt;/P&gt;&lt;P&gt;I have found the Job-Notifications section within the Databricks Job, and I can set it there in the UI. But according to CoPilot, I cannot programmatically set this and as soon as i do a code deploy/rebuild,&amp;nbsp; the values will get removed.&lt;/P&gt;&lt;P&gt;Is it true that I can't set these through code and that any manual set is wiped out?&lt;/P&gt;&lt;P&gt;It seems a bit weird to me as it kind of makes the Ui ability worthless? I have weekly deploys by the way which would mean a manual set every week if the above is true.&amp;nbsp; Cheers all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 08:52:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/set-a-theshold-notification-on-job-run-time/m-p/152258#M11592</guid>
      <dc:creator>rwalrondNHS</dc:creator>
      <dc:date>2026-03-27T08:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set a theshold Notification on Job run time.</title>
      <link>https://community.databricks.com/t5/get-started-discussions/set-a-theshold-notification-on-job-run-time/m-p/152286#M11594</link>
      <description>&lt;P&gt;The notification settings are determined either by the UI or by DAB (formerly known as databricks asset bundles).&lt;BR /&gt;In either case they represent a fixed value and not a relative one (like 2 times the time of the previous run).&lt;BR /&gt;DAB is not code but yml config. But as said: a fixed value, not a formula.&lt;BR /&gt;Basically you either use the UI or DAB, because if you use both, the one will overwrite the other.&lt;/P&gt;&lt;P&gt;That being said: I would use dab. it is not real code but with yml quite a lot is possible.&amp;nbsp; But only fixed values though for this case.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 10:24:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/set-a-theshold-notification-on-job-run-time/m-p/152286#M11594</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2026-03-27T10:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set a theshold Notification on Job run time.</title>
      <link>https://community.databricks.com/t5/get-started-discussions/set-a-theshold-notification-on-job-run-time/m-p/152302#M11597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/222909"&gt;@rwalrondNHS&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can set these thresholds and notifications programmatically. They’re part of the normal Jobs definition, not a UI‑only feature. I've just tested this for a sample job and it works perfectly.&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;Under the hood, the run longer than X --&amp;gt; send email UI maps to the below&lt;/P&gt;
&lt;UL class="p8i6j07 p8i6j02"&gt;
&lt;LI&gt;health.rules with metric = RUN_DURATION_SECONDS, op = GREATER_THAN, value = &amp;lt;seconds&amp;gt;&lt;/LI&gt;
&lt;LI&gt;email_notifications.on_duration_warning_threshold_exceeded = [ "you@example.com", ... ]&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p8i6j01 paragraph"&gt;For example (Jobs API 2.1/2.2): This is the output I had from my sample job notification setting&lt;/P&gt;
&lt;DIV class="l8rrz21 _1ibi0s3dn" data-ui-element="code-block-container"&gt;
&lt;DIV class="l8rrz23 _1ibi0s3d6 _1ibi0s332 _1ibi0s3do _1ibi0s3bm _1ibi0s3ce"&gt;
&lt;DIV class="lqznwq0"&gt;&lt;LI-CODE lang="markup"&gt;{
  "health": {
    "rules": [
      {
        "metric": "RUN_DURATION_SECONDS",
        "op": "GREATER_THAN",
        "value": 60
      }
    ]
  },
  "email_notifications": {
    "on_duration_warning_threshold_exceeded": [
      "ashXX.XXX@XXX.com"
    ]
  }
}&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;If your deployment pipeline uses jobs/create or jobs/reset and doesn’t include these fields in the JSON/YAML it sends, those UI‑configured values get overwritten by whatever is in code (which in that case is "nothing"). That’s not a limitation of the feature, it’s just “"nfra as code" doing what it’s supposed to do: the code is treated as the source of truth.&lt;/P&gt;
&lt;P&gt;So..it’s not true that you can’t set them via code. You absolutely can (and should, if you have weekly deploys). However,&amp;nbsp;manual UI tweaks will be wiped if your job‑as‑code definition omits them on each deploy.&lt;/P&gt;
&lt;P&gt;The UI is still useful for interactive editing and discovery, but in a CI/CD setup you’ll want to copy those settings into your job JSON/Terraform/Bundles config so they persist across rebuilds.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 12:36:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/set-a-theshold-notification-on-job-run-time/m-p/152302#M11597</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-27T12:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set a theshold Notification on Job run time.</title>
      <link>https://community.databricks.com/t5/get-started-discussions/set-a-theshold-notification-on-job-run-time/m-p/152306#M11598</link>
      <description>&lt;P&gt;It absolutely does help, it is exactly what I was asking Copilot can i do this in Databricks. So i'm glad i asked here as well &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; Many thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 13:16:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/set-a-theshold-notification-on-job-run-time/m-p/152306#M11598</guid>
      <dc:creator>rwalrondNHS</dc:creator>
      <dc:date>2026-03-27T13:16:31Z</dc:date>
    </item>
  </channel>
</rss>

