Open coopbri opened 1 year ago
I am all for ergonomics but there are npm modules that solve this same thing. I think it is better to spend time maintaining core queue issues and features than maintaining a library for converting between human strings and milliseconds. Some alternatives: https://www.npmjs.com/package/parse-relative-time https://www.npmjs.com/package/ms
What we could do of course is provide examples in the documentation where these libraries are used.
Completely understand. I think documentation examples would be beneficial (e.g. patterns/recipes for scheduled jobs containing those libraries, particularly the ms
library due to its popularity).
Is your feature request related to a problem? Please describe.
I think the DX for scheduled jobs could be improved, with native support for job scheduling instead of having to perform a delay calculation as outlined in the delayed jobs documentation:
Describe the solution you'd like
Agenda has a nice DX for scheduled jobs, simplified examples:
agenda.schedule('in 20 minutes', ...)
agenda.schedule('tomorrow at noon', ...)
agenda.schedule(new Date(), ...)
Describe alternatives you've considered
Wrapping BullMQ with a custom adapter
Additional context
Similar issue from Bull: https://github.com/OptimalBits/bull/issues/1648