5.1: Can I configure a failed trigger to retry?

Jim G. (20 posts)
June 30, 2025 08:38 AM
Accepted Answer

Scenario:

  • I have a trigger based on email messages.
  • When the trigger detects an email, <a custom script that selects messages> queries a SQL Server database to decide if it should process the message.

Problem:

  • The admin team applies Windows patches to our SQL Server box at approximately 2 AM on Saturday mornings.
  • Emails come in during this window when the database is unavailable.
  • The trigger fails and the trigger will not activate again until an admin right clicks the respective job, clicks 'Edit', then clicks 'OK'.

Question:

  • In v. 5.1, is there a way to configure the trigger to retry after the outage window?
Bill Staff (618 posts)
June 30, 2025 02:08 PM
Accepted Answer

There's no way to configure the trigger to re-enable itself after a failure that causes it to be disabled. It seems like we should be smarter about this sort of thing, though, so I've written up an enhancement request to look into it.

I was going to suggest defining an exclusion period for this maintenance window so that the job is suspended during that time, but adTempus still evaluates triggers during an exclusion window and just defers execution, so your evaluation script would still run and fail. I'll also write this up as something to look into--maybe there should be an option to not evaluate triggers during the period.

You could simulate the same thing by scheduling jobs that hold this job prior to the maintenance window and then release it after some reasonable time. You can do this by creating a job that doesn't do anything by uses a Response with a Job Control Action that targets your email job, using the options to hold and release.