Skip to main content
Nintex Community Menu Bar
Solved

Manipulating Date/Time to be used as workflow exit

  • March 31, 2020
  • 1 reply
  • 8 views
  • Translate

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: 

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

Replacement Text:  57

 

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

 

Best answer by butlerj

Awesome tip!

 

Thanks @Ken_T 

View original
Did this topic help you find an answer to your question?

1 reply

butlerj
Nintex Employee
Forum|alt.badge.img+20
  • Nintex Employee
  • 260 replies
  • Answer
  • April 2, 2020

Awesome tip!

 

Thanks @Ken_T 

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings