feat: add `nuxt-cron`
A Nuxt module for cron jobs in app.
Thanks for PR i think this is a nice module however the way the crons are initiated in a nitro plugin and never-closing is little bit tricky.
I would suggest to wait on listing this module until Nitro adds native tasks feature. I think it would be best that crons are built on top of tasks for better stability.
@pi0 Thanks for feedback. Yes, cron has never closed before. The new version v1.4.0 adds Nito hook Graceful Shutdown. In which all tasks will be shutdown.
I think that's enough to publish module.
I'm not sure if it works with hybrid build / prerendering. So i guess worth to wait specially that release is close :) Will keep you posted.
hybrid build / prerendering - works as it should. I process such builds separately
Yep, saw the workaround in your module :)
✅ Graceful Shutdown ✅ Processing hybrid build / prerendering
What else is missing? Maybe I don't understand something 😒
I think it should be still built on top of Nitro tasks layer otherwise we will be advising a feature that is inconsistent. Nitro tasks also allows native integration with platform primitives for scheduled tasks which is not possible with module level and i don't want to split ecosystem on this.
I appreciate your effort on making this module but if that you can be patient to see what is coming :)