Closed omarkhairy21 closed 1 year ago
I would love this!
One challenge:
// worker.ts
export default {
async scheduled(event: ScheduledEvent, env: Env, ctx: ExecutionContext) {
await handleScheduled(event, env, ctx, (schedule: Schedule) => {
schedule.run(async () => {
// some bespoke function
}).dailyAt('8:00').timezone('America/New_York');
schedule.job(new MyJobClass(my, args)).weekly();
// ...
});
},
}
How does this sound? https://github.com/jplhomer/superflare/issues/18
Sounds Great! thanks for that huge effort I left a comment with just one concern on the pull request
BTW that pull request and your comment inspired me to create a cron toolkit library to create cron expressions with human-readable functions also with type safety
@omarkhairy21 That's awesome!
Hey, @jplhomer thanks for that awesome work i was struggling to build my abstraction around the Cloudflare stack but you did an amazing job!
I am wondering if there is a plan to support Cron jobs. Also, i am ready to contribute to this.