[TASKMGMT-34] "The Scheduler has been shutdown" error after modifying scheduler's configuration Created: 16/Nov/18  Updated: 12/Mar/19  Resolved: 03/Jan/19

Status: Closed
Project: Task Management
Component/s: None
Affects Version/s: 1.2.4
Fix Version/s: 1.2.6

Type: Bug Priority: Neutral
Reporter: Jonathan Ayala Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLSCH-64 Scheduler discards all programaticall... Closed
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Epic Link: Support
Sprint: Features 2
Story Points: 3

 Description   

After the scheduler is restarted by changing its configuration, it's not possible to schedule a a task.

Steps to reproduce:

  1. Test a common scheduled publication in a page, it works.
  2. Go to configuration and modify /modules/scheduler/config/jobs/demo@description with any value so that the scheduler is forced to be restarted. The following traces should appear in the log:
    INFO  info.magnolia.module.ModuleManagerImpl            : Stopping module scheduler
    INFO  info.magnolia.module.scheduler.SchedulerModule    : Waiting up to 30 seconds for scheduled jobs to stop...
    INFO  info.magnolia.module.ModuleManagerImpl            : Starting module scheduler 
  1. Try again a scheduled publication in same page than 1, now you will always get the error when pressing Approve & Publish action:
    ERROR magnolia.task.schedule.DefaultTaskSchedulerService: Could not schedule job [publish_9d754a73-bb6e-4e38-97be-9cc4d562e8ed].
    org.quartz.SchedulerException: The Scheduler has been shutdown. 

Although it's not possible to schedule publication tasks, scheduled jobs keep on working fine. It can be tested by setting demo job cron to 0 0/1 * 1/1 * ? * so that it will be executed every minute.

Therefore, the problem is not with the scheduler itself but with info.magnolia.task.schedule.DefaultTaskSchedulerService.schedule(Task) and/or its sub methods.


Generated at Mon Feb 12 11:02:27 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.