T
tRPC

Using tRPC in CRON jobs

Using tRPC in CRON jobs

Zzrilman2/28/2023
Hey everyone, this might be a very stupid question, but is it possible to use tRPC inside a CRON job? I saw that Vercel now supports them, and since I use tRPC inside a NextJS project, I thought that it could be used. Unfortunately, I wasn't able to find anything online.
Nnlucas2/28/2023
Do you mean call a tRPC API from a CRON job? If the job can run JS, then you just have a simple program which when started creates a tRPC client and calls the API
Zzrilman2/28/2023
Yes. Exactly. Since Vercel allows ts & js cron jobs a simple vanilla client should do the work? https://trpc.io/docs/vanilla

Looking for more? Join the community!

T
tRPC

Using tRPC in CRON jobs

Join Server