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] throw error on past date or run immediately? #156

Closed shadowgate15 closed 2 years ago

shadowgate15 commented 2 years ago

What problem are you trying to solve?

Currently if a date is past when bree.start() is called it fails silently.

Describe the feature

Perhaps this should either throw an error or just immediately start.

Checklist

shadowgate15 commented 2 years ago

We will just log a warning here instead of throwing an error or running it. This allows us to set a one time job, for a specific date and not have to worry about it killing the process because we forgot to remove it.