Cronjob on vercel, or next.js itself.
Answered
itsMU1X posted this in #help-forum
itsMU1XOP
i want to make a code that checks the invalid sessions and delete them from the database and the code runs every day
how to make that in vercel or next.js and what do you guys recommend me for this situation?
thanks.
how to make that in vercel or next.js and what do you guys recommend me for this situation?
thanks.
Answered by joulev
Nextjs doesnt have native support for cronjob. You have to use the hosting provider to implement cron job.
In Vercel, check this guide: https://vercel.com/guides/how-to-setup-cron-jobs-on-vercel
In Vercel, check this guide: https://vercel.com/guides/how-to-setup-cron-jobs-on-vercel
2 Replies
@itsMU1X i want to make a code that checks the invalid sessions and delete them from the database and the code runs every day
how to make that in vercel or next.js and what do you guys recommend me for this situation?
thanks.
Nextjs doesnt have native support for cronjob. You have to use the hosting provider to implement cron job.
In Vercel, check this guide: https://vercel.com/guides/how-to-setup-cron-jobs-on-vercel
In Vercel, check this guide: https://vercel.com/guides/how-to-setup-cron-jobs-on-vercel
Answer