Question

I want to create a timer job in sharepoint 2013, the purpose of the timer job, is to loop through my list items and do these two actions:-

  • Check if the "Review Date" of an item is met (Review date = today), and if so, to chnage the item status to be "In Progress".

  • then to send an email to the "Assigned To" user , that there is an item with Review Date that have been met.

Now i read many articles about performing similar background tasks in SharePoint 2013 , and i seattle on using Timer Jobs , and i find a link which talk about this.

but seems all the articles are creating farm solution to create a timer jobs. but my question is if using Farm solutions in SharePoint 2013 is considered a deprecated approach as mentioned in these links :-

https://msdn.microsoft.com/en-us/library/office/jj163902.aspx & https://msdn.microsoft.com/en-us/library/office/jj163902.aspx?f=255&MSPPError=-2147217396

so not sure how i should create my timer job in SharePoint 2013?

EDIT

now i am using workflow 2010 inside SharePoint designer 2013. so i am planning to do the following steps to implement my retention policy :-

  • using SharePoint designer 2013 i will create & publish a reusable 2010 workflow as follow, where i will be checking if the "Review Date" = today & Status = "Active", then to update the item status and send an email:-

    enter image description here

  • then i will go to site collection settings >> content type >> and i will associate the above workflow with the content type.

  • after that on the content type i will set a retention policy as follow:-

enter image description here

mainly it will first run when an item is created (created date + 0 day), then i set it to run a workflow , and i set the recurrence to be each day.

  • final step is to set the related timer jobs ("Information management policy" and "Expiration policy") to run daily as they are configured to run weekly.

so can you adivce on these points please:-

  1. is my approach for creating the above retention policy valid ?

  2. Although i am using workflow 2010 , but do you have any idea why workflow 2013 does not work with retention ? is this a imitation in workflow 2013 ? or there is another reason ?

Thanks

Was it helpful?

Solution

Farm solutions are only unavailable if SharePoint Online is a consideration. SharePoint 2016 continues to fully support not only custom Timer Jobs, but Full Trust Code Solutions, as well. I feel that FTC solutions should be used when and where appropriate for customers who continue to use SharePoint On-Prem.

If you can find alternative solutions that do not require FTC, that's ideal. As a sysadmin-focused solution, one might look into creating a PowerShell script that replicates the functionality and run it as a Scheduled Task on a SharePoint server.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top