Skip to content

Cloudflare Hono with cron event #1087

Answered by yusukebe
Nytrm asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Nytrm

You can create a worker with a scheduled event and a Hono app like this:

const app = new Hono()

//...

export default {
  fetch: app.fetch,
  async scheduled(event, env, ctx) {
    ctx.waitUntil(doSomeTaskOnASchedule())
  },
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Nytrm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants