#Cron Job in Nest back-end.

1 messages · Page 1 of 1 (latest)

sleek wave
#

Regarding file structure, if you inherited an existing code base, best ask the people that you inherited it from

limber tusk
#

Yes, I've just checked that post

#

It means bullmq and bull are not related to cron jobs? We have to use nest/schedule and create a external scheduling app (or use third-party service)?

sleek wave
#

Bullmq (the successor to bull) has a frature called scheduled jobs. Those can be used to run stuff periodically. It's most useful for stuff that is dynamically scheduled and should survive app restart.

Dynamic cron jobs from nestjs/schedule don't survive app restart, but it's more than enough for static jobs using the @Cron decorator.

limber tusk
sleek wave
#

Whoever wrote that code should help you with that.
I see an IIFE there, that doesn't look very re-usable to me

#

That code seems like it runs once and puts the jobs to bull. Another application probably consumer that queue. That's as much as I can gather from the snippet

limber tusk
sleek wave
#

I do understand, but you can't expect volunteers to solve urgent problems for you. I enjoy providing free NestJS comminity support in my own free time.

You can check docs of BullMQ on scheduled jobs or ask for (paid) help in #1096815728721666139