Users mysteriously being disabled? It may be the User Decay Task

Version 5



    Jive has a built in task called the User Decay Task that runs automatically every day that will auto-disable non-active user accounts. If you are seeing users who have not logged in recently being suddenly disabled then this may be the cause of this.


    A quick way to check this is to find the "Last Logged In" date for one of these recently disabled users and see if they haven't logged into the system in the past:


    • 12 months (standard account)
    • 2 months (external contributor)


    If this is the case then you are likely seeing the effects of the User Decay Task.


    You can disable the User Decay Task to prevent this from happening in the future. Please see the details below



    • Verified for versions: Jive 5, 6, 7, 8 Jive-x (Cloud)




    Default Task Behavior

    Everyday, at 1:00 am, the User Decay Task executes.  Each account's lastLoggedIn value (from the jiveUser table) is compared to the current date/time.  If the difference is greater than 12/2 months, the account is disabled.


    Users who have never logged in are not affected

    Users who have not yet logged in will have a value of 0 set for their lastLoggedIn field.  The logic in the application only compares the timestamps if this value is greater than 0.  Therefore, these users' accounts will not be disabled by the decay task.


    Re-enabling a disabled User

    If a user's account is being auto-disabled by the decay task and an admin re-enables the account for them, then the user MUST log in (which will update the lastLoggedIn) before the the decay task executes again.  Otherwise, they will be auto-disabled once again.


    How to disable the User Decay Task

    To disable the tasks set the following system properties.

    user.decay.task.enabled = false

    external.user.decay.task.enabled = false

    In Jive 7 and newer this property takes effect immediately and can be confirmed by looking for the "userDecayTask" on the System Tasks Management page of the admin console: System > Management > System Tasks.


    The last-logged-in cutoff can be overridden by setting the following system property:

    user.decay.period = 16

    If the value of the property is 16 only user accounts with a most recent login time before 16 months ago will be disabled. 12 is the default value. The task will not disable any users if the property is set to 0.


    A restart is required for these property to take effect prior to JIve 7.


    The User Decay Task can also be disabled for Jive-x Cloud sites. You will need to contact Jive Support by opening a new support case in order to request to have this feature disabled.


    Changing when the task executes


    The default cron expression for when this task executes is:

    <property name="cronExpression" value="0 0 1 * * ?" />

    This translates to 1:00 am every day.  ( Quartz Scheduler | Documentation | Quartz 1.x Tutorials: crontrigger )


    To modify when this process kicks off, you will need to add the system property of spring.userDecayTask.cronExpression, and give it a new cron expression.


    For example:

    If you would rather the decay task only execute once a week, rather than nightly, you could set this system property:

    spring.userDecayTask.cronExpression = 0 0 1 ? * SUN


    This will set the process to occur every Sunday at 1:00 am.

    Once again, a restart will be required for the change to take effect.


    Related Information