Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've built a state machine workflow that has several tasks.

If any of the tasks are not completed by 4pm I need to signify (email) the team(s).

I guess I need some sort of event that fires at 4pm, checks status of all tasks and sends email. Sharepoint has a Delay activity, but this counts down. Perhaps I could programatically give it a timeout by calculating the hours remaining till 4.

Whats the best way to accomplish this please?

share|improve this question
    
This post on SO has more details several different ways to do this. stackoverflow.com/questions/529045/… –  Ryan Jan 5 '12 at 9:37
add comment

3 Answers

I would not use a workflow for this because...

  1. You want it to execute at a specific time
  2. You want it to run for / check multiple items.

Workflows are bad at both those things.

I would put the code in a console application or powershell script and schedule it to run everyday at 4:00PM in task scheduler.

As mentioned by @Alexander, a timer job would also be a good alternative.

share|improve this answer
add comment

I think that you can create a timer job. This timer job can be configured to be executed at 4pm. This timer job can check tasks and send emails.

share|improve this answer
add comment

For cases like this, I typically use a secondary workflow where I'll write a record out to a hidden lists that monitors the task or record and checks it at the specified time and takes the required action if the condition is not met. It is typically a pretty simple workflow.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.