summaryrefslogtreecommitdiff
path: root/ext/cron/01_cron.ts
AgeCommit message (Collapse)Author
2024-09-05refactor(ext/cron): align error messages (#25300)Ian Bull
Aligns the error messages in the cron extension to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
2024-08-20chore: enable no-console dlint rule (#25113)David Sherret
2024-04-21fix: Fix some typos in comments (#23470)welfuture
Signed-off-by: welfuture <wellfuture@qq.com>
2024-01-26refactor: migrate extensions to virtual ops module (#22135)Bartek IwaƄczuk
First pass of migrating away from `Deno.core.ensureFastOps()`. A few "tricky" ones have been left for a follow up.
2024-01-24fix(ext/cron): automatically override unspecified values (#22042)Igor Zinkovsky
Fixes #22041
2024-01-23BREAKING(unstable): remove `Deno.cron()` overload (#22035)Asher Gomez
This change removes the currently deprecated `Deno.cron()` overload with `options` as a potential last argument. This might be fine to do now, in a major release, as `Deno.cron()` is an unstable API. I thought of doing this while working on #22021. If this is not ready to remove, I can instead set the removal version of this overload for Deno v2. Note: this overload was deprecated in Deno v1.38.2 (#21225). So it's been deprecated for over 2 months.
2024-01-10refactor: use `core.ensureFastOps()` (#21888)Kenta Moriuchi
2024-01-07fix(ext): enable prefer-primordials for internal TypeScript (#21813)Kenta Moriuchi
Enabled prefer-primordials lint for ext/cron and ext/kv.
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-27perf: remove opAsync (#21690)Matt Mastracci
`opAsync` requires a lookup by name on each async call. This is a mechanical translation of all opAsync calls to ensureFastOps. The `opAsync` API on Deno.core will be removed at a later time.
2023-11-30feat(cron): added the support for json type schedule to cron api (#21340)Raashid Anwar
Added the support for JSON type schedule to cron API; previously it was string only. fixes #21122
2023-11-16feat(ext/cron) modify Deno.cron API to make handler arg last (#21225)Igor Zinkovsky
This PR changes the `Deno.cron` API: * Marks the existing function as deprecated * Introduces 2 new overloads, where the handler arg is always last: ```ts Deno.cron( name: string, schedule: string, handler: () => Promise<void> | void, ) Deno.cron( name: string, schedule: string, options?: { backoffSchedule?: number[]; signal?: AbortSignal }, handler: () => Promise<void> | void, ) ``` This PR also fixes a bug, when other crons continue execution after one of the crons was closed using `signal`.
2023-11-01feat(cron) implement Deno.cron() (#21019)Igor Zinkovsky
This PR adds unstable `Deno.cron` API to trigger execution of cron jobs. * State: All cron state is in memory. Cron jobs are scheduled according to the cron schedule expression and the current time. No state is persisted to disk. * Time zone: Cron expressions specify time in UTC. * Overlapping executions: not permitted. If the next scheduled execution time occurs while the same cron job is still executing, the scheduled execution is skipped. * Retries: failed jobs are automatically retried until they succeed or until retry threshold is reached. Retry policy can be optionally specified using `options.backoffSchedule`.