I have created email reminder system using SharePoint 2010 workflow in SPD which sends email to user after every 12 hours i.e. first at 12am and then at 12pm.
For this purpose I am creating two lists called Primary and Secondary.
Primary contain two fields; LastReminderTime (datetime field) and NextReminderTime (this is calculated field which adds 12 hours in LastReminderTime field)
Secondary contain one field LastReminderTime (datetime field)
Both lists are running a workflow called "P workflow" and "S workflow" respectively. They are set to run on item change.
This is how it works:
An item is updated in Primary list with LastReminderTime (which is a date and time is always starts at 12am, for e.g. 2016-12-12 12:00am). NextReminderTime will be set as 2016-12-12 12:00pm). Item is already present in this list (I am skipping that part because it is not necessary)
"P workflow" runs and pauses till NextReminderTime comes at which it sends email to user and then sets LastReminderTime field in "Secondary" list with value of "NextReminderTime" in "Primary" list
"S workflow" runs and immediately sets "LastReminderTime" in "Primary" with its own "LastReminderTime"
Now "NextReminderTime" in "Primary" becomes "2016-12-13 12:00am"
"P workflow" runs and pauses till "NextReminderTime" and then sends email and then it does the same thing as mentioned in steps above.
So in this way they keep on running and sends email every 12 hours (there is a condition which if met will stop the workflow so it won't run forever but I am ignore that part)
Now the problem I am facing is there are 13 items each in both lists so at exactly 12:00am or 12:00pm, 13 "P workflow" runs, sends email and updates field "Secondary". Then 13 "S workflow" runs immediately and sets value in "Primary". Then 13 "P workflows" run in "Primary and pause till "NextReminderTime". But problem is out of 13 workflows, there are always 1 to 3 workflows in Secondary list that will not "LastReminderTime" in "Primary" even though they ran successfully.
When I see history of those workflows it shows that they all ran at that time i.e. 12:00am or 12:00pm but for some reason workflow for some items (normally between 1 to 3) "S workflow" doesn't update item in "Primary" list.
Could it be because SharePoint cannot handle so many workflows at once i.e. all running at the same time and updating fields in one another?