Workflow Timer activity not working as expected.

Sagar Solanki
Kilo Expert

We have had some approvals where were raised on Friday but they expired on Monday because the Timer activity in the workflow has Timer Information > Duration = 3 Days. To prevent this, I attached the Schedule "8-5 weekdays excluding holidays" to the Timer.
Expected: Time should count 3 days only including Monday-Friday 8-5.

Timer Schedule -->

find_real_file.png

Timer activity executing in the workflow context -->

find_real_file.png

Checked this entry in System Scheduler > Scheduled Jobs and the next action time is 21st Feb which is absolutely incorrect.
find_real_file.png

Does anyone know how to resolve this so that the timer expires after 3 days and in the case of Friday, it expires on Wednesday that is 3 days later without counting Saturday and Sunday and only 8 AM to 5 PM?

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Three days is 72 hours, 72 "hours" within the schedule you gave.....is Feb 21...so that's why you see it as such. You'd need to have it wait 24 hours, which would be three "business days" during that time.

Please mark reply as Helpful/Correct. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Three days is 72 hours, 72 "hours" within the schedule you gave.....is Feb 21...so that's why you see it as such. You'd need to have it wait 24 hours, which would be three "business days" during that time.

Please mark reply as Helpful/Correct. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Narendra Kota
Mega Sage

Hi,

 

you may find the below thread helpful.

https://community.servicenow.com/community?id=community_question&sys_id=db24cd78db0e2f802e8c2183ca96...

 

you said 3 days i.e, 72 hours.

8-5 is 9 hours, 72/9 = 8 days and include 4 weekend days which is 12 days from now.

Give 27 hours in the schedule instead of 3 days since you selected the schedule and try.

 

Mark my answer as correct or helpful if it helped.

Sagar Solanki
Kilo Expert

Thank you, Allen and Narendra. The approach suggested worked exactly as expected. I changed the wait time in Timer activity to 27 hours and now I have next action time as Wednesday 5 PM as the request was raised after 5 PM on Friday.

Thank you both of you once again. Cheers !!!