There was an error while loading. Please reload this page.
2 parents 137d5fa + 6a0148d commit 0b7b254Copy full SHA for 0b7b254
src/cron.q
@@ -174,7 +174,7 @@
174
.cron.i.runOnce:{[jobId]
175
status:.cron.i.run jobId;
176
177
- update nextRunTime:0Wp from `.cron.jobs where id = jobId;
+ .cron.cancelJob jobId;
178
179
:status;
180
};
@@ -187,10 +187,16 @@
187
188
jobDetails:.cron.jobs jobId;
189
190
+ if[.type.isInfinite jobDetails`nextRunTime;
191
+ .log.debug "Job has been self-cancelled. Will not reschedule [ Job: ",string[jobId]," ]";
192
+ :status;
193
+ ];
194
+
195
newNextRunTime:(+). jobDetails`nextRunTime`interval;
196
197
$[newNextRunTime > jobDetails`endTime;
198
update nextRunTime:0Wp from `.cron.jobs where id = jobId;
199
+ / else
200
update nextRunTime:newNextRunTime from `.cron.jobs where id = jobId
201
];
202
0 commit comments