I have a scheduled workflow that iterates through a number of document libraries and creates a summary email of documents created for that day for each user that has created documents. The workflow is scheduled to run daily, during a large query window, beginning at 9:05 PM. On some days the workflow runs with no issues on those days the workflow starts as expected at 9:05 PM. However on other days the workflow begins about 30 minutes late and seems to start over and sends out the summary emails twice.
The logs indicate that the workflow only ran once but the steps of the workflow seem to start over again from the beginning after the final loop completes. This is despite a stop workflow step that is being reached.
The workflow is rather long so a screen shot is problematic however here is the gist:
Is the workflow being run from both web front ends?
Perhaps you could create a custom list so as to register your daily schedules and update it when your workflow starts. Then so as to avoid the duplicated start add a condition at the workflow start so as to verify that the workflow has already started today.
You may want to introduce a 5 minute Pause action as the first action within your workflow. Others have seen this help with these types of issues. I would give it a try and see if it helps in your case. For additional information, please reference this article by Aaron Labiosa Defensive Workflow Design Part 4 - Slow Down and Speed Up
Thanks everyone for your help,
The issue turned out to be an extremely large workflow history list. Nintex support pointed me to this Defensive Workflow Design Part 1 - Workflow History Lists
After creating a dedicated history list for the workflow the duplication did resolve.