Module

x/kv_cron/mod.ts>EnqueueJobOpOptions

Use Deno Kv API to register cronjobs.
Latest
interface EnqueueJobOpOptions
implements Pick<KvCronOptions<JobsSchema>, "kv" | "kvKeyPrefix">
import { type EnqueueJobOpOptions } from "https://dotland.deno.dev/x/kv_cron@0.0.2/mod.ts";

EnqueueJobOpOptions defines the options for enqueuing a cron job.

Properties

nonce: string

nonce is the nonce of the cron job.

name: string | number | symbol

name is the name of the cron job.

schedule: string | JSONSchedule

schedule is the cron expression that defines when the cron job is triggered.

optional
date: Date

date is the date which the cron job is relative to.

optional
amount: Deno.KvU64

amount is the number of times the cron job should be triggered.

optional
backoffSchedule: number[]

backoffSchedule 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.