Skip to main content

I thought I'd share something I recently did to bolster the resiliency of an existing scheduled WF. 

 

I have a WF that runs every hour and should exit at '57 minutes past the hour' to make sure it doesnt interfere wiht the next run. This was being accomplished by setting a var to the current time and then adding 57 minutes to it.  

 

Unfortunately our recent sharepoint connector stability issues have caused the scheduled job to error out a couple of times a day.   If I manually re-launch the WF 27 minutes into the hour, then the exit time gets set incorrectly and will interfere with the next scheduled job that starts on the hour. 

 

This  Regex can be used to modify an existing var that contains a Nintex formatted "Current date and time" and replaces the minutes with a value of your choice.  In my case, I'm replacing the minutes value with '57' so that no matter what time the WF is launched, it will always exit at 57 minutes past the hour.   You can use this structure to modify other parts of the date/time as well but you'll need to play with the Regex to get it right. 

 

Just sharing for others that may have a similar issue

 

"Apply a Regular Expression"

Operation: Replace

Pattern: 

(?<=:)(?:\.|e^:\])*(?=:)

Replacement Text:  57

 

Store the first result as your variable that you need to modify. 

 

Awesome tip!



 



Thanks @Ken_T 


Reply