Open VladimirCores opened 1 year ago
Thanks for the suggestion. We are planning to support nitro tasks which can be a good fit for from support. I will escalate your issue to that as soon as could write RFC/POC.
This sounds amazing. I am migrating some cron jobs from vercel to supabase. Is the thought with Nitro Tasks that they would be converted through presets for different providers - or default to something like node-cron?
Certainly provider agnostic :) (we can use nitro plugins to hook into node-cron, etc)
When prerendering and using node-cron, build hangs
import cron from 'node-cron'
export default defineNitroPlugin(async () => {
startCron()
})
function startCron() {
cron.schedule('0 4 * * *', async () => {
console.warn('Running scheduled task')
})
console.warn('Cron started')
}
Describe the feature
As a developer I would like to run cron operation, they start automatically on engine start (with their own state restored from cache).
Additional information