none
Information management retention policy strange date behaviour RRS feed

  • Question

  • I found that one of our sites had a large workflow history list of 120,000 items. I set up a retention policy in the list settings to permanently delete items based off a date property on the item. I chose Created Date and +1 days. It only deleted 30,000 items. When I looked at the items still in the list there were items from 2012. They are well and truly older than one day!

    I have now gone in and set it to Created Date +0 days. It now appears to be deleted items again after starting the 'information management policy' and 'expiration policy' timer jobs.

    I had this same issue on my development server and after setting it to Created Date +0 days it removed evry single item from the workflow history list.

    My question: Why didn't Created Date +1 days remove all items older than today?

    Wednesday, February 17, 2016 6:11 AM

Answers

All replies

  • Hi,

    According to your post, my understanding is that the retention policy not worked when remove all items older than 1 days in workflow history list.

    I have done a test in my SharePoint 2013 and I can't reproduce your issue.

    I create a retention policy in workflow history list:

    After running "Information management policy" and "Expiration policy" are the 2 timer jobs. Alll items older than 1 days are removed.

    For your issue, make sure you have run "Information management policy" and "Expiration policy" are the 2 timer jobs which are responsible for retention policy manually .

    http://sharepointony.info/blog/Lists/Posts/Post.aspx?ID=7

    Best Regards,

    Lisa Chen


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, February 18, 2016 7:47 AM
    Moderator
  • Yes I ran both of those timer jobs. I ran them a couple of times to make sure. I thought maybe it was having an issue because of the large number of items in the list (120,000 items). Could the server have timed out on the process the first time around?  Although the second time it did nothing. So I changed the policy to +0 days and then it deleted the lot. So I have set it back to +1 days now.
    Thursday, February 18, 2016 9:56 PM
  • Hi Vertigrator,

    It seems the issue is results by large number of items.

    The “Information management policy” timer job forces the policy’s formula to evaluate to determine if the items have expired, and the “Expiration policy” timer job kicks off the policy’s expiration action for those items marked as expired by the fist timer job.

    Every time when you run the "Expiration policy" job manually, there will be some items been deleted.

    From the similar issue post, as an alternative choice, writing a console application that deletes the items from the Workflow History list, and then deletes them from the Recycle Bin: https://code.msdn.microsoft.com/CleanWorkflowHistory

    Here is a similar issue post, you can take a look at:

    https://social.technet.microsoft.com/Forums/office/en-US/22938da0-51c0-4229-a520-4a8d8e912992/information-management-policy-and-workflow-history-and-the-timer-job?forum=sharepointadminprevious

    Best Regards,

    Lisa Chen


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Marked as answer by Vertigrator Friday, February 19, 2016 2:52 AM
    Friday, February 19, 2016 2:28 AM
    Moderator