Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add nuxt-cron #821

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: add nuxt-cron #821

wants to merge 1 commit into from

Conversation

hywax
Copy link

@hywax hywax commented Nov 15, 2023

A Nuxt module for cron jobs in app.

@pi0
Copy link
Member

pi0 commented Nov 15, 2023

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.

@hywax
Copy link
Author

hywax commented Nov 15, 2023

@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.

@pi0
Copy link
Member

pi0 commented Nov 15, 2023

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.

@hywax
Copy link
Author

hywax commented Nov 15, 2023

hybrid build / prerendering - works as it should. I process such builds separately

@pi0
Copy link
Member

pi0 commented Nov 15, 2023

Yep, saw the workaround in your module :)

@hywax
Copy link
Author

hywax commented Nov 15, 2023

✅ Graceful Shutdown
✅ Processing hybrid build / prerendering

What else is missing? Maybe I don't understand something 😒

@pi0
Copy link
Member

pi0 commented Nov 15, 2023

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants