Trigger a Workflow when a date is reached in SharePoint Online

I have created a simple list workflow (SharePoint Online) which emails a user, informing them a Document's Target Closure Date has been reached. The workflow works fine when started manually.

I want to trigger the workflow only when Target Closure Date matches today's date.

The best solution seemed to be to use a Retention Policy. So I went to:

> Library Settings

> Information Management Policy settings

> Document content type

> ticked 'Enable Retention'

> Time Period:  Target Closure Date + 0 days

> Action:  Start the relevant workflow.

This worked only on two occasions - both were Saturday mornings, at 3.30am and 4.30am. I can see in this MS article the Expiration Policy timer job only runs weekly on SharePoint 2013, so can anyone confirm that the schedule is the same in SharePoint Online?

If so, is there any way in SharePoint Online I can trigger a workflow when a date is reached?

Thanks for your help,

Alyosha

January 29th, 2014 1:51pm

Not sure if you have the ability to change how often the timer runs in OFfice 365 administration, but that could be 1 option.  Otherwise, you cannot trigger events based on a clock tick (unless it is a timer job)... what you could do, is run the workflow on item modified, and have it pause until the closure date, and then run the closure actions... however, this would not handle a situation where someone sets the closure date a second time (after the workflow is already pausing until the closure date). 

The following post has a helpful idea, but it requires writing a custom workflow activity in Visual Studio: http://social.technet.microsoft.com/Forums/msonline/en-US/2715194b-7371-4213-bb62-3f79d1e91fe0/timer-jobs-in-sharepoint-online?forum=onlineservicessharepoint

  • Edited by SharePointMC 16 hours 33 minutes ago added helpful info and link to another similar question
  • Proposed as answer by Devendra VelegandlaMVP 9 hours 49 minutes ago
Free Windows Admin Tool Kit Click here and download it now
January 29th, 2014 2:34pm

Not sure if you have the ability to change how often the timer runs in OFfice 365 administration, but that could be 1 option.  Otherwise, you cannot trigger events based on a clock tick (unless it is a timer job)... what you could do, is run the workflow on item modified, and have it pause until the closure date, and then run the closure actions... however, this would not handle a situation where someone sets the closure date a second time (after the workflow is already pausing until the closure date). 

The following post has a helpful idea, but it requires writing a custom workflow activity in Visual Studio: http://social.technet.microsoft.com/Forums/msonline/en-US/2715194b-7371-4213-bb62-3f79d1e91fe0/timer-jobs-in-sharepoint-online?forum=onlineservicessharepoint

  • Edited by SharePointMC Wednesday, January 29, 2014 7:33 PM added helpful info and link to another similar question
  • Proposed as answer by Devendra VelegandlaMVP Thursday, January 30, 2014 2:16 AM
January 29th, 2014 10:29pm

Thanks SharePointMC. Yes I had read the threads on pausing until the date, but I don't think it's reliable as you said.

Thanks for the link - I'm not keen on the solutions involving the workflow restarting itself every morning for each document, as I think the workflows will break down at some point. But I may need to look at this type of solution.

The Retention Policy would be perfect if only the job ran daily, or if there was a workaround using this policy, I'll look into this problem further.

Free Windows Admin Tool Kit Click here and download it now
January 30th, 2014 5:36am

Hi Alyosha,

According to your description, my understanding is that you want to send an email to a user when the Target Closure Date was reached in SharePoint Online.

The timer job of Retention Policy runs weekly in SharePoint Online, so we cannot use the Retention Policy to trigger the workflow.

As a workaround, I recommend to create a workflow associated with the library to send the email when the Target Closure Date was reached.

Here are the detailed steps:

  1. Create a workflow associated with the library and set the workflow to start when an item is created.
  2. Select Pause until Date to set the workflow to pause until the Target Closure Date.
  3. Select Send an Email.

Best regards.

Thanks

February 5th, 2014 3:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics