Rayhan
Rayhan3mo ago

Cron job still "Executing" while it's Failed since +24h

Hello, my cron job on Deno Deploy is still at "Executing" state while it is actually Failed since more than 24 hours. I tried to : - commit a change to reset cron - commit with changing cron schedule - commit without cron (it got removed from Dashboard but after I reverted it got back to its previous state "Executing" while Failed) without success. Any idea?
No description
1 Reply
Rayhan
RayhanOP3mo ago
Changing unique name "resolved" this issue but it seems like process is still not close somewhere because I reverted my unique name change to previous one "Cron job" and it got back to "Executing" Failed state. It should have called core.close(rid); somewhere but this is called only signal.abort as the code states here: https://fossies.org/linux/www/deno-2.1.2.tar.gz/deno-2.1.2/ext/cron/01_cron.ts?m=t (search core.close(rid);) Also docs is wrong: https://docs.deno.com/deploy/kv/manual/cron/#retrying-failed-runs It says that backoffSchedule (options) should be in last arg but code says that it should be third if an handler is present. Basically it should be:
Deno.cron("Retry example", "* * * * *", {
backoffSchedule: [1000, 5000, 10000],
}, () => {
throw new Error("Deno.cron will retry this three times, to no avail!");
});
Deno.cron("Retry example", "* * * * *", {
backoffSchedule: [1000, 5000, 10000],
}, () => {
throw new Error("Deno.cron will retry this three times, to no avail!");
});
see: https://fossies.org/linux/www/deno-2.1.2.tar.gz/deno-2.1.2/ext/cron/01_cron.ts?m=t (search function cron()

Did you find this page helpful?