1

I have a workflow that I need to run on a daily basis.

It's going to run in a web application hosted in Sharepoint Online, so there is no access to Central Administration. Which means the timer jobs related to information retention will run weekly, so the "daily retention stage on a bogus list" technique doesn't work in this scenario.

Also because of the way it's hosted, I can't deploy a custom timer job.

Someone suggested using two workflows, each triggering the other. One would do the actual thing I want it to do, the other would just set a delay until the next day. Problem is, should either stop for any reason, it'd take manual action to get them running again, right?

Any ideas how this could be done? Guaranteeing a daily execution, I mean.

3

Well you could indeed rely on using the Delay Activity to which you set proper execution time, and always updating when to run next, etc. - but really Workflows are not meant to be used instead of Timer-Jobs.

A better alternative would be keep this delay to a minimum by using a certain flag on the list which by modifying would actually trigger the Workflow (configured to run on modifications) that needs to do performing of the activities.

Also you could envision to use an event handler to do the work (also supported in sanboxed solutions) - so you could easily deploy in Office 365.

  • Yes, this is really my favored approach. The bulk of my logic is actually an event, that fires upon a change in an item. I have a bogus list with a single item. I want to change that item automatically once a day to fire the event. I am at a loss as to how to make that happen, though. – Renan Jun 3 '13 at 17:44
  • if you already have an handler built, most likely ItemAdded or ItemUpdated would be your events, however keep the code short (as best practice). triggering a change is very easily achievable event by using a ECMA script from ECMA, via some SetTimeout - but that would require to be on the page. – Marius Constantinescu - MVP Jun 4 '13 at 21:44
1

You could, conceivably, create a local application (command line) and run it as a Windows scheduled task that would go out to O365 and kick off the workflow. You would be able to build in auto-retry and error reporting to minimize manual intervention.

http://ranaictiu-technicalblog.blogspot.com/2013/05/programmatically-start-sharepoint-2013.html

1

Take a look at Workflow Scheduler for SharePoint Online in Office 365:

SharePoint Online doesn't allow to create TimeJobs, but I don't see any reason to avoid scheduling site workflows.

I'm developer of this product.

Note: This product is paid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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