Welcome to MSDN Blogs Sign in | Join | Help

Information Management Policies – Expiration

Information Management Policies – Expiration

The question is, when an information management expiration policy is defined, is the expiration period applied immediately or at some future time? If the answer is, at some future time, exactly what is that time, and can you set it?

Contrived Example

To take a concrete example, create a document library.

Next, modify the default view allow us to see what is happening. Go to Settings, Views, and click on All Documents. Add the columns Created, Exempt from Policy, and Expiration Date to the view. Press the OK button to save the view changes.

Now Go to Settings, Document Library Settings, and click on Information management policy settings.

  • Select Define a policy and press the OK button.
  • Check Enable Expiration
  • Under retention period, select A time period based on the item's properties.
  • Select Created + 30 days.
  • Under When the item expires, select Perform this action, and Delete.
  • Press the OK button.

Return to the library, All Documents view. Upload several documents. The uploaded documents will have an Expiration Date of the current date plus 30 days as expected.

Go back to the Settings, and change the retention period to Created + 60 days. Upload some more documents. The newly uploaded documents correctly show an expiration date of the current date plus 60 days, but the previously uploaded documents still have an expiration date of the current date plus 30 days. It appears there is an inconsistency.

Information Policy Jobs

The key to this inconsistency is the Information Management Policy timer job. This job runs once daily by default. It iterates all the web applications/site collections/sites/lists in the farm, looking for information policy changes. When a policy change is found, all affected item's metadata is updated; consequently, the expiration dates of the library documents in our contrived example are not updated until this job runs. When this job eventually runs, the inconsistency will be corrected.

There is an stsadm command to change the schedule of this job, SetPolicySchedule.

stsadm -o setpolicyschedule   -schedule <recurrence string>

Parameter 

Value 

Required? 

Description 

schedule

A valid Windows SharePoint Services Timer service (SPTimer) schedule in the form of any one of the following schedules:

  • "Every 5 minutes between 0 and 59"
  • "Hourly between 0 and 59"
  • "Daily at 15:00:00"
  • "Weekly between Fri 22:00:00 and Sun 06:00:00"
  • "Monthly at 15 15:00:00"
  • "Yearly at Jan 1 15:00:00"

An acceptable default value is "once every 24 hours." 

Yes 

Sets how often the policy framework processes changes to a policy. The value should be a properly formatted SPTimer argument. 

Since this job could affect performance in a large farm, be careful when scheduling it. Daily is probably sufficient. It is also a good idea to have it run about an hour before Expiration Policy job, so the Expiration Policy job will find up-to-date item metadata when it applies the expiration policy to items.

You can find current information on both the Information Management Policy and Expiration Policy jobs by going to Central Administration > Operations > Timer Job Definitions. This will show you the frequency and last run time of each job, but not the complete schedule.

There is currently no stsadm command to change the Expiration Policy job; however, Mattias Lindberg has a code sample to for the job to run using the object model.

Summary

  1. Item metadata is not updated for policy changes until the Information Management Policy job executes.
  2. The Information Management Policy job schedule can be set with stsadm –o setpolicyschedule.
  3. The Information Management Policy job should be scheduled to execute shortly before the Expiration Policy job.
  4. The retention policy is not applied to items until the Expiration Policy job executes.
  5. The Expiration Policy job currently can only be scheduled through the object model.
Published Thursday, July 03, 2008 4:51 PM by jimmiet

Comments

# a-foton &raquo; Information Management Policies ??? Expiration

# re: Information Management Policies – Expiration

Wednesday, July 30, 2008 6:28 AM by sureshtalasta

Hi,

I want to hide the "Exempt from policy" and "Original Expiration Date" from the Display form of the list item after setting the Expiration Policy to its parent list.

Can you please let me know how to achieve this?

Thanks!

Suresh.

Anonymous comments are disabled
 
Page view tracker