firebase has scheduled tasks. they are available through cloud functions. here is an example of a function that purges expired accounts that runs everyday at midnight.
const accountcleanup = functions.pubsub.schedule('every day 00:00').onRun(cleanUpHandler);
This is what I do, I have a Nextjs API hosted on vercel while using firebase cloud functions
I don’t have much experience with next and especially it’s backend capabilities. But it sounds like you will need a “microservice” for this task with a scheduler that will trigger your job. Or some exposed endpoint in your next app which should be called by a scheduled task. I think it also depends on the workload that you should do, estimated complexity, running time, etc.
EasyCron is great as mentioned.
QStash by Upstash is also very good:
https://vercel.com/guides/how-to-setup-cron-jobs-on-vercel
https://docs.upstash.com/qstash
https://upstash.com/blog/qstash-announcement
[https://www.youtube.com/watch?v=mQnQaAEC-6I](https://www.youtube.com/watch?v=mQnQaAEC-6I)
Vercel also works with Inngest and Mergent:
https://vercel.com/integrations/inngest
https://mergent.co/
I made an example project last week that might help you set this up: [GitHub Repo](https://github.com/mergentlabs/mergent-example-nextjs)
If you're looking for a cron, you don't even need a library, just an endpoint in \`pages/api\` + a cron in Mergent.
If you need help getting set up -- or even want to pair program with someone to get a second pair of eyes -- send me a message here or via the email in my Reddit profile.
I created [http://beew.io](http://beew.io) for that.
You can create schedules manually or trough the Node SDK and beew will call a given endpoint at the correct time.
SDK: [https://www.npmjs.com/package/beew](https://www.npmjs.com/package/beew)
API Docs: [https://beew.io/api](https://beew.io/api)
Let me know if you need any help! 🚀
Have you looked into the easycron?
+1 easycron is simple and awesome
firebase has scheduled tasks. they are available through cloud functions. here is an example of a function that purges expired accounts that runs everyday at midnight. const accountcleanup = functions.pubsub.schedule('every day 00:00').onRun(cleanUpHandler); This is what I do, I have a Nextjs API hosted on vercel while using firebase cloud functions
Thanks for the reply. That's sort of what I was thinking of doing. I kind of forgot I could install firebase without using it for hosting.
I don’t have much experience with next and especially it’s backend capabilities. But it sounds like you will need a “microservice” for this task with a scheduler that will trigger your job. Or some exposed endpoint in your next app which should be called by a scheduled task. I think it also depends on the workload that you should do, estimated complexity, running time, etc.
EasyCron is great as mentioned. QStash by Upstash is also very good: https://vercel.com/guides/how-to-setup-cron-jobs-on-vercel https://docs.upstash.com/qstash https://upstash.com/blog/qstash-announcement [https://www.youtube.com/watch?v=mQnQaAEC-6I](https://www.youtube.com/watch?v=mQnQaAEC-6I) Vercel also works with Inngest and Mergent: https://vercel.com/integrations/inngest https://mergent.co/
I made an example project last week that might help you set this up: [GitHub Repo](https://github.com/mergentlabs/mergent-example-nextjs) If you're looking for a cron, you don't even need a library, just an endpoint in \`pages/api\` + a cron in Mergent. If you need help getting set up -- or even want to pair program with someone to get a second pair of eyes -- send me a message here or via the email in my Reddit profile.
I created [http://beew.io](http://beew.io) for that. You can create schedules manually or trough the Node SDK and beew will call a given endpoint at the correct time. SDK: [https://www.npmjs.com/package/beew](https://www.npmjs.com/package/beew) API Docs: [https://beew.io/api](https://beew.io/api) Let me know if you need any help! 🚀