Cron job with tRPC
can I make a cron job using tRPC? I would like a tRPC endpoint to be called periodically by the same Next.js application that also hosts the tRPC api, meaning I cannot use an external service to make the request to the app. Is this possible somehow? In plain typescript, this would be something like a setInterval function that would call the server side function caller every n seconds.
1 Reply
for reference: Elysia is using Croner to implement cron jobs https://github.com/hexagon/croner, I wonder how would this be used in the context of tRPC with a next.js app