breejs / bree

Bree is a Node.js and JavaScript job task scheduler with worker threads, cron, Date, and human syntax. Built for @ladjs, @forwardemail, @spamscanner, @cabinjs.
https://jobscheduler.net
MIT License
3.01k stars 78 forks source link

[feat] interval starts from job finished, not job started #125

Open meglio opened 3 years ago

meglio commented 3 years ago

Is there a way to make a job re-occur N milliseconds after it finished previous time?

shadowgate15 commented 3 years ago

Not directly in the configs. however you could listen for the 'worker deleted' event and then set a timeout for that job to run again.

If you would like to create a pull request for this then we would gladly review it.

meglio commented 3 years ago

Shell we leave this issue open and convert it into the feature request? Closing the issues will make the idea die until the next time someone needs it and asks again.

shadowgate15 commented 3 years ago

Yes @meglio! Thank you for catching my mistake! 😅