ASheppardWork
ASheppardWork

Reputation: 95

What does RunDeck do when it re-tries the job in regards to sending emails for failures?

I would like to re-try a job that only has 1 node. However, I don't want to send a error unless 3 retries fail. So if it fails less than that no emails are sent. Does the re-try send a failure email for every attempt?

Upvotes: 0

Views: 366

Answers (1)

MegaDrive68k
MegaDrive68k

Reputation: 4325

Yes, using the "On Retryable Failure" notification combined with retries defined at the "Retry" textbox (Go to "Other" tab when you create or edit your job) you receive an email on each retry attempt.

If you want a single email after all retries just use the "On Failure" notification in the following way (the job have an intentional error to trigger the failure notification):

<joblist>
  <job>
    <defaultTab>nodes</defaultTab>
    <description></description>
    <executionEnabled>true</executionEnabled>
    <id>1bdda8f3-7b11-4003-9f6f-3480f6d08aac</id>
    <loglevel>INFO</loglevel>
    <name>HelloWorld</name>
    <nodeFilterEditable>false</nodeFilterEditable>
    <notification>
      <onfailure>
        <email attachType='file' recipients='[email protected]' subject='failure!' />
      </onfailure>
    </notification>
    <notifyAvgDurationThreshold />
    <plugins />
    <retry delay='2'>3</retry>
    <scheduleEnabled>true</scheduleEnabled>
    <sequence keepgoing='false' strategy='node-first'>
      <command>
        <exec>eco "hi"</exec>
      </command>
    </sequence>
    <uuid>1bdda8f3-7b11-4003-9f6f-3480f6d08aac</uuid>
  </job>
</joblist>

Upvotes: 1

Related Questions