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.02k stars 78 forks source link

Cron interval doesnt execute functional job #31

Closed jdalrymple closed 4 years ago

jdalrymple commented 4 years ago

When using a cron string, the job does not execute at the specified time, 6:20pm every day. It does however, execute on start. Not sure exactly why but...theres that lol.

function test () { console.log('yay') }

const bree = new Bree({
  root: false,
  jobs: [
    {
      name: 'snapshot',
      path: test,
      cron: '20 18 */1 * *'
    }
  ]
});

bree.start()
niftylettuce commented 4 years ago

Thanks for the heads up, will look at this ASAP unless @shadowgate15 gets to it before myself.

niftylettuce commented 4 years ago

Please upgrade to v3.1.0 as these issues are fixed. I have also published an npm deprecation notice for older versions.