Skip to content

superflare@0.1.0

Compare
Choose a tag to compare
@github-actions github-actions released this 25 Apr 13:58
· 7 commits to main since this release
919e4dc

Minor Changes

  • 1a16f73: Adds support for scheduled tasks using Cron Triggers.

    To schedule a task, call the run method on the schedule object passed to the callback function from handleScheduled 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.