`scheduledTasks` + `cloudflare.deployConfig` should populate cron triggers config
Describe the feature
What I have to do now:
export default defineNitroConfig({
compatibilityDate: "2025-03-05",
preset: "cloudflare_module",
experimental: {
tasks: true,
},
cloudflare: {
deployConfig: true,
wrangler: {
triggers: {
crons: ['*/15 * * * *', '45 10 * * 2-6']
}
}
},
scheduledTasks: {
"*/15 * * * *": ["task1"],
"45 10 * * 2-6": ["task2"],
},
});
Expected config:
export default defineNitroConfig({
compatibilityDate: "2025-03-05",
preset: "cloudflare_module",
experimental: {
tasks: true,
},
cloudflare: {
deployConfig: true,
},
scheduledTasks: {
"*/15 * * * *": ["task1"],
"45 10 * * 2-6": ["task2"],
},
});
Additional information
- [x] Would you be willing to help implement this feature?
Do the settings you have right now work on Cloudflare Workers? I followed this doc to define a task and have similar settings to yours. It works locally but doesn’t work after deployment.
Update: If i use NuxtHub to deploy the project, the scheduled task won't get called. If i deploy the project manually on Cloudflare, it works. Nuxt 3.17.3 with Nitro 2.11.12
If you can deploy nitro only to cloudflare but only hub fails, i suggest to report it in nuxt hub repo.
If you can deploy nitro only to cloudflare but only hub fails, i suggest to report it in nuxt hub repo.
Sure, sorry for the off-topic. I reported it here in case someone runs into the same issue