Skip to content

Commit 1f8f1b1

Browse files
committed
cron: Log when 'repeat until' job reaches the end time
1 parent 3d69e3c commit 1f8f1b1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/cron.q

+5-4
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,13 @@
242242

243243
newNextRunTime:(+). jobDetails`nextRunTime`interval;
244244

245-
$[newNextRunTime > jobDetails`endTime;
246-
update nextRunTime:0Wp from `.cron.jobs where id = jobId;
247-
/ else
248-
update nextRunTime:newNextRunTime from `.cron.jobs where id = jobId
245+
if[newNextRunTime > jobDetails`endTime;
246+
.log.if.info "Job has reached 'end time'. Will not schedule again [ Job: ",string[jobId]," ]";
247+
newNextRunTime:0Wp;
249248
];
250249

250+
update nextRunTime:newNextRunTime from `.cron.jobs where id = jobId;
251+
251252
:status;
252253
};
253254

0 commit comments

Comments
 (0)