Cron Jobs (NOT VERCEL)
Answered
Arinji posted this in #help-forum
ArinjiOP
https://www.npmjs.com/package/cron
Can i use this on a next route handler or server action not hosted on vercel but a nodejs server
Can i use this on a next route handler or server action not hosted on vercel but a nodejs server
10 Replies
ArinjiOP
bump :D
@Arinji https://www.npmjs.com/package/cron
Can i use this on a next route handler or server action not hosted on vercel but a nodejs server
yes if you are self hosting a long running server
Answer
@Ray yes if you are self hosting a long running server
ArinjiOP
yea we hosting it on a normal nodejs server
so uh just use it as normal in an api route
@Arinji so uh just use it as normal in an api route
oh in an api route? I think the job will die when the api route finished
@Ray oh in an api route? I think the job will die when the api route finished
ArinjiOP
hmm, well where shld i use it then?
can i use them in pages?
@Ray in the custom server
ArinjiOP
oh shit wtf