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

  • Question

  • 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?


    Shonilchi..

    Thursday, December 20, 2012 12:48 PM

Answers

  • 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;
    
     
    ...}


    SharePoint - Nauplius Applications
    Microsoft SharePoint Server MVP
    MCITP: SharePoint Administrator 2010


    • Edited by Trevor SewardMVP Thursday, December 20, 2012 4:23 PM
    • Proposed as answer by Pratik Vyas Friday, December 21, 2012 3:59 AM
    • Marked as answer by Entan Ming Thursday, December 27, 2012 2:42 AM
    Thursday, December 20, 2012 4:22 PM

All replies

  • 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;
    
     
    ...}


    SharePoint - Nauplius Applications
    Microsoft SharePoint Server MVP
    MCITP: SharePoint Administrator 2010


    • Edited by Trevor SewardMVP Thursday, December 20, 2012 4:23 PM
    • Proposed as answer by Pratik Vyas Friday, December 21, 2012 3:59 AM
    • Marked as answer by Entan Ming Thursday, December 27, 2012 2:42 AM
    Thursday, December 20, 2012 4:22 PM
  • Thanks Trevor.. Is the above script the full script and is this a PS script?

    Shonilchi..

    Friday, December 21, 2012 2:58 AM
  • 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.

    SharePoint - Nauplius Applications
    Microsoft SharePoint Server MVP
    MCITP: SharePoint Administrator 2010

    Friday, December 21, 2012 4:05 AM
  • 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 )

    Wednesday, July 3, 2013 10:31 AM
  • Per the other thread, this requires a custom timer job:

    http://social.technet.microsoft.com/Forums/sharepoint/en-US/77726b6f-62d7-49bd-ab75-9867957cea0a/how-to-sent-my-site-deletion-notification-email-to-administrator


    Trevor Seward, MCC

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Wednesday, July 3, 2013 2:43 PM