miaowing / nest-schedule

A cron-like and not-cron-like job distributed scheduler for Nest.js by decorators.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Waiting for scheduled tasks in @Interval(delay) decorator

biels opened this issue · comments

Does the module check if the previous execution of a task is still running when using the Interval decorator? Or even better, does it schedule it after the previous task has finished?
I tried to look at the code carefully but couldn't figure it out.

Should I somehow implement a subclass of NestDistributedSchedule with a custom tryLock function?

commented

Sorry, the module does not check the previous execution of a task now, I will try to resolve it in next version. @biels

commented

You can upgrade to 0.6.0 version, using waiting config parameter, eg: @interval(1000, {waiting: true})