locked
How to Exlcude Weekends While Running a Workflow? RRS feed

  • Question

  • Hi,

    Currently, we have a primary and secondary workflow which runs of a custom task list.  These workflows combined, create a looping effect, which sends an email out to employees reminding them that a task is due. This email will repeat on a daily basis until either 2 conditions are met:

    1) An employee has modified the list  item's status from pending to completed. 

    2) The email reminders reach a set limit (Ex: Once 10 emails are sent, stop workflow).

    If one of these two conditions is not met then the workflow will continue to send emails out on weekends. We do not want to send email reminders over the weekend, so how to we set our Team Site up OR workflows up to only run on a 5 Day week (Mon.-Fri.)?

    Please, any advice is appreciated!

    Thank you!

    Jerry

    Thursday, August 23, 2012 5:13 PM

Answers

  • How about adding a calculated colum to the list that calculates the day

    =TEXT([Today],"ddddd")

    then simply add some logic in to not send the email if the day is Saturday or Sunday.

    The calculated colum should referesh every time you interact with item. it doesn't stop the workflow from running but it stops thr workflow sending emails over the weekend.

    Kenny

    Friday, August 31, 2012 7:58 AM

All replies

  • What kind of workflow are you using ? Is it created in Visual Studio or you are using SharePoint Designer?

    If it is a Visual Studio workflow you can easily get the Current Date Time and get the day and stop processing the workflow on weekends.

    Thursday, August 23, 2012 7:23 PM
  • Sorry! I exluded an important bit of info. I am using SharePoint Designer 2010.  As far as Visual Studio, that is not an option for me as I have been asked to use a no-code solution.

    Jerry

    Thursday, August 23, 2012 8:17 PM
  • How about adding a calculated colum to the list that calculates the day

    =TEXT([Today],"ddddd")

    then simply add some logic in to not send the email if the day is Saturday or Sunday.

    The calculated colum should referesh every time you interact with item. it doesn't stop the workflow from running but it stops thr workflow sending emails over the weekend.

    Kenny

    Friday, August 31, 2012 7:58 AM
  • Great advice Kenny!

    I will try this out!

    Jerry

    Friday, August 31, 2012 5:08 PM