diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-01-23 23:07:54 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 17:37:54 +0530 |
commit | d6d437c4dce9beb6b304c481812e65d6751cbeb7 (patch) | |
tree | 5284d5b294a39204005b3aad8a752d10fc3dec67 /cli/tsc | |
parent | 6238b0a4579539a627d192e0ce2c4a10993aeb8c (diff) |
BREAKING(unstable): remove `Deno.cron()` overload (#22035)
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.
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/dts/lib.deno.unstable.d.ts | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 9cbfe2bfa..80bb4e327 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -1265,37 +1265,6 @@ declare namespace Deno { /** **UNSTABLE**: New API, yet to be vetted. * - * Create a cron job that will periodically execute the provided handler - * callback based on the specified schedule. - * - * `schedule` can be a string in the Unix cron format or in JSON format - * as specified by interface {@linkcode CronSchedule}, where time is specified - * using UTC time zone. - * - * ```ts - * Deno.cron("sample cron", "20 * * * *", () => { - * console.log("cron job executed"); - * }); - * ``` - * `backoffSchedule` option can be used to specify the retry policy for failed - * executions. Each element in the array represents the number of milliseconds - * to wait before retrying the execution. For example, `[1000, 5000, 10000]` - * means that a failed execution will be retried at most 3 times, with 1 - * second, 5 seconds, and 10 seconds delay between each retry. - * - * @category Cron - * @deprecated Use other {@linkcode cron} overloads instead. This overload - * will be removed in the future. - */ - export function cron( - name: string, - schedule: string | CronSchedule, - handler: () => Promise<void> | void, - options: { backoffSchedule?: number[]; signal?: AbortSignal }, - ): Promise<void>; - - /** **UNSTABLE**: New API, yet to be vetted. - * * A key to be persisted in a {@linkcode Deno.Kv}. A key is a sequence * of {@linkcode Deno.KvKeyPart}s. * |