ADF Trigger runs immediately after being enabled

Johnson, Mark 5 Reputation points
2023-05-06T04:52:20.99+00:00

Hello!

We're seeing an odd issue with Data Factory deployments and Trigger behavior. As is normal for many people, we're housing our ARM templates in Git, publishing from the collaboration branch to UAT/Production via Azure DevOps, and using powershell commands pre/post ARM Template deployment to stop and start our Triggers.

This was working quite well up until about 4-6 weeks ago. Now, we're seeing the oddest issue; some, but not all, triggers that are enabled via the powershell command are then executing their associated pipelines, instead of waiting for their scheduled execution time. Further, the same thing is occurring when we manually enable stopped triggers in UAT/Production, and then publish said changes to Data Factory.

If anyone has thoughts on this or seen said behavior before, I'd love to know if there is a workaround. At this point, we've had to disable the Trigger restart step in our ADO Release pipeline, then after a Data Factory deployment is complete, manually re-enable Triggers and immediately stop their pipelines from running, post-deployment.

Thank you!
Mark

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,933 questions
{count} votes

2 answers

Sort by: Most helpful
  1. VasimTamboli 4,785 Reputation points
    2023-05-06T18:54:45.84+00:00

    Hello Mark,

    It sounds like you're experiencing unexpected trigger behavior in your Data Factory pipelines. This issue can occur due to various reasons such as incorrect trigger settings or overlapping schedules. Here are some steps you can take to troubleshoot this issue:

    Check the trigger settings - Make sure that the trigger settings are configured correctly. Check the start time, end time, and the recurrence interval. Make sure that the trigger is not set to run immediately after being enabled.

    Check overlapping schedules - If you have multiple triggers with overlapping schedules, this can cause unexpected behavior. Make sure that the triggers are not overlapping and that they are scheduled at different times.

    Check the time zone settings - Make sure that the time zone settings for the trigger are configured correctly. If the time zone is set incorrectly, this can cause the trigger to run at the wrong time.

    Check the pipeline settings - If the trigger is running the pipeline immediately after being enabled, check the pipeline settings to make sure that it is not set to run on-demand.

    Check the logs - Check the Data Factory logs to see if there are any error messages or warning messages that might indicate the cause of the issue.

    If none of the above steps solve the issue, you can try disabling the trigger and then re-enabling it after a few minutes. This can sometimes help to resolve the issue.

    I hope this helps! Let me know if you have any further questions.


  2. ShaikMaheer-MSFT 38,311 Reputation points Microsoft Employee
    2023-05-09T06:29:11.9033333+00:00

    Hi Johnson, Mark,

    Thank you for posting query in Microsoft Q&A Platform.

    You may be using tumbling window triggers here. Tumbling window triggers will run all past windows as well once they get publish. If you don't want that behavior then consider creating schedule triggers.

    Please check below videos to understand these triggers better.

    Tumbling Window Trigger in Azure Data Factory

    Schedule Trigger in Azure Data Factory

    Hope this helps. If not, please share more details about your triggers. Thank you.


    Please consider hitting Accept Answer button. Accepted answers help community as well.