How to edit the my site activity newsfeed cleanup job interval of 14 days

Hi Friends,

Is there a way to edit the interval of the mysite activity newsfeed cleanup job which is by default of 14 days?  If I need to edit it to like 3 days or 1 day or 1 minute, is it possible?

December 20th, 2012 3:48pm

No.  The 14/11 day is built into the timer job code.  You'll need to develop your own timer job if you want to customize it, or simply disable the timer job and handle it manually.

[Guid("752FC8C4-4EA8-4781-8B75-995563AAD5ED")]
internal class MySiteCleanupJob : SPServiceJobDefinition
{
    // Fields
    private const string ADFilterFormat = "(&({0})(samaccountname={1}))";
    [Persisted]
    private string handlerString;
    private const string LDAPFilterFormat = "(&({0})(uid={1}))";
    internal const int NumberOfDaysBeforeDeletion = 14;
    internal const int NumberOfDaysBeforeReminder = 11;

 
...}
Free Windows Admin Tool Kit Click here and download it now
December 20th, 2012 7:22pm

Thanks Trevor.. Is the above script the full script and is this a PS script?
December 21st, 2012 5:58am

No, it is the code that defines the MySite Cleanup timer job.  It is just there to show you that it is hard coded.  In order to build your own timer job, you would need to make a C# solution that emulated the behavior with your own custom business logic.
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2012 7:05am

HI,

I need to sent deletion email notifications to his manager as well as sharepoint administrator(by default only manager will receive this kind of mail but administrator also need to receive same mail )

July 3rd, 2013 6:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics