Issue
- Setting the interval to -1 for scheduled jobs is allowed by the UI, but causes an array of issues.
- Steps to reproduce:
- Start the server and login as an administrator.
- Open Application Menu from top right side application menu icon, and go to Control Panel > Configuration > Job Scheduler
- Go to the "Scheduled Jobs" tab and behold all the out-of-the-box scheduled jobs provided by Liferay. The table shows the status and the Next Run Date of all the scheduled jobs.
- Go to Control Panel > Configuration > System Setting > Content and Data > Message Boards
- Click on the the first available setting "Message Boards" on this page, under the section "System Scope" . This setting has a configurable property "Expire Ban Job Interval". Set its value to -1 . Behold that no error is returned by Liferay while saving the value of this property as -1
- Restart Liferay server and keep an eye on the startup logs. The logs indicate an exception while trying to create the trigger configuration for Expire Ban Job Interval and mentions that the value must not be lesser than or equal to 0
- Login as administrator and go back to Control Panel > Configuration > Job Scheduler > Scheduled Jobs tab. This time, behold that although all the out-of-the-box scheduled jobs are still available in the list, and shown with status 'Normal', none of them will now get triggered automatically at their scheduled timings and the status will continue to be shown as 'Normal' even after the 'Next Run Date' has passed. From this point onward, the 'Next Run Date' is shown as a date in the past now.
- It happens with 'Job Scheduler Triggers' if any is configured prior to step # 6.
Expected Behavior: Even though -1 is configured as the value for the Expire Ban Job Interval property in step # 5 mentioned above, this should ideally not break all the other scheduled jobs.
Observed Behavior: The UI allows the setting “-1”, all jobs stop working despite showing status as normal
Environment
- Liferay DXP 7.4
Resolution
- The observed behavior is a known bug addressed by the LPS-190994 and has already been included in 7.4.13 DXP U102 and 2024.Q1.1.
Additional Information
- If a hotfix is required, please create a support ticket requesting the hotfix by attaching the patch details.
- Installing Fix Packs and Hotfixes on Liferay DXP will guide you to install the Fixpack/Hotfix in your environment.