-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathExamNumberGenerationJobRound1.java
More file actions
32 lines (27 loc) · 1.1 KB
/
ExamNumberGenerationJobRound1.java
File metadata and controls
32 lines (27 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package life.mosu.mosuserver.infra.cron.job;
import life.mosu.mosuserver.application.examapplication.cron.ExamNumberGeneratorExecutor;
import life.mosu.mosuserver.infra.cron.annotation.CronJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import java.time.LocalDate;
@Slf4j
@CronJob(cron = "0 30 19 13 10 ?", name = "examNumberGeneratorJob_20251019")
@DisallowConcurrentExecution
@RequiredArgsConstructor
public class ExamNumberGenerationJobRound1 implements Job {
private final ExamNumberGeneratorExecutor examNumberGeneratorExecutor;
@Override
public void execute(JobExecutionContext context) {
LocalDate examDate = LocalDate.of(2025, 10, 19);
try {
log.info("Starting exam number generation, examDate={}", examDate);
examNumberGeneratorExecutor.generate(examDate);
log.info("Finishing exam number generation");
} catch (Exception e) {
log.error("Generating exam number failed", e);
}
}
}