From 98b37998ab1fd3cf989817a5ea3b42b348a3ec12 Mon Sep 17 00:00:00 2001 From: Adam Saghy Date: Mon, 30 Oct 2023 15:29:11 +0100 Subject: [PATCH] FINERACT-1971: Fix (disabled) job scheduling --- .../infrastructure/jobs/service/JobRegisterServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java index e89f30a97a4..2478faa5e00 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java @@ -247,13 +247,13 @@ public void onApplicationEvent(@SuppressWarnings("unused") ContextClosedEvent ev @Override public void scheduleJob(final ScheduledJobDetail scheduledJobDetails) { try { - final JobDetail jobDetail = createJobDetail(scheduledJobDetails, Collections.emptySet()); - scheduledJobDetails.setJobKey(getJobKeyAsString(jobDetail.getKey())); if (!scheduledJobDetails.isActiveSchedular()) { scheduledJobDetails.setNextRunTime(null); scheduledJobDetails.setCurrentlyRunning(false); return; } + final JobDetail jobDetail = createJobDetail(scheduledJobDetails, Collections.emptySet()); + scheduledJobDetails.setJobKey(getJobKeyAsString(jobDetail.getKey())); final Trigger trigger = createTrigger(scheduledJobDetails, jobDetail); final Scheduler scheduler = getScheduler(scheduledJobDetails);