N
Nuxt2mo ago
Phillip

Do Cronjobs / Webhooks have an H3 Event?

Hi, I have cronjobs and webhooks who perform regular tasks. As far as I understand a H3 event is passed by a user who makes an API call for example. Cronjobs do not contain a H3 Event right? Because some utilities require to pass an event. For example, the i18n module needs an event on the server side. await useTranslation(event) If I would do something like:
export default defineCronHandler('everyFiveMinutes', async () => {
const t = await useTranslation(useEvent())
}
export default defineCronHandler('everyFiveMinutes', async () => {
const t = await useTranslation(useEvent())
}
This would not work?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server