summaryrefslogtreecommitdiff
path: root/ext/cron/local.rs
AgeCommit message (Collapse)Author
2024-10-12refactor(ext/cron): use concrete error type (#26135)Leo Kettmeir
2024-05-23refactor: remove custom `utc_now` in favor of `chrono::Utc:now` feature ↵Felipe Baltor
(#23888) This PR removes the use of the custom `utc_now` function in favor of the `chrono` implementation. It resolves #22864. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-24chore: use deno_unsync through deno_core (#23532)Matt Mastracci
2024-02-12chore: update to Rust 1.76 (#22376)林炳权
Update to Rust 1.76
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
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`.