breejs/bree ? reverse-engineered prompt
Reverse engineered prompt
Build me a Node.js job scheduler library like Bree that lets me run background jobs in worker threads with cron, dates, intervals, and human friendly time values.
I want a simple way to define jobs by name or file, start them on boot, run them with concurrency, retries, throttling, and cancel them cleanly when the app shuts down. It should support async jobs, graceful reloads, and basic event logging so I can see when jobs start, finish, fail, or get stopped. Please make it work in both CommonJS and ESM, and include a few clear examples for scheduling a job from a jobs folder.
Keep it lightweight and easy to use, with sensible defaults, but let me override things like worker options, timeouts, and intervals. If you need to check current Node docs or worker thread behavior, go ahead and look it up online.
Are you gonna build this?
make sure you review the code using coderabbit