WORKAROUND/HOW-TO: leverage BUILT-IN Timer Jobs when you can’t build a custom Timer Job
2012-08-28 MV: Here’s a workaround I’ve devised and used with good success, in case anyone else finds themself needing a timer job-triggered workflow instead of an event-triggered workflow, and they’re in a highly-constrained environment…
You need a custom Timer Job, but are constrained to only say SharePoint Designer 2010 and (typically) Sandboxed Solutions, which don’t permit Timer Job projects to be deployed.
You may NOT actually need a “custom” Timer Job – you just need “a” timer job, so here’s how to use the one already built-into SharePoint 2010’s Retention Policy to trigger a SharePoint Designer 2010 workflow – all legal/permitted even in many highly-constrained environments:
– CREATE a SharePoint Designer 2010 workflow which executes the actions you need;
– CREATE a bogus list at the same level in site hierarchy where you need the workflow actions to be executed;
– CONFIGURE List Settings > Information Management Policy Settings > Retention Policy > “Retention Stage” so that whenever an item is added to this list, starting 1 day after its creation, you trigger your above workflow. ALSO configure this stage to REPEAT every 1 day, forever;
– ADD 1 bogus item to the list, this immediately triggers the retention policy stage, which triggers the workflow DAILY… JUST as if you’d created a CUSTOM TIMER JOB.
I’ve used this trick on several projects at several highly-constrained client environments (even government facilities), and have been surprised how often it works… plus it’s quite stable and predictable.
Give it a try, and let me know if it works for anyone.
-Mark Vogt, freelance SharePoint Architect/Developer/Consultant/Project Manager
www.markvogt.us | email@example.com