github-actions
released this
25 Apr 13:58
·
15 commits
to main
since this release
Minor Changes
-
1a16f73: Adds support for scheduled tasks using Cron Triggers.
To schedule a task, call the
run
method on theschedule
object passed to the callback function fromhandleScheduled
function:import { handleScheduled } from "superflare"; export default { async scheduled(event: ScheduledEvent, env: Env, ctx: ExecutionContext) { return await handleScheduled(event, env, ctx, config, (schedule) => { schedule .run(async () => { // Some task that runs every day at midnight UTC }) .daily(); }); }, };
Learn more about Scheduled Tasks.