Aviel Fedida Aviel Fedida - 1 year ago 173
Node.js Question

NodeJS, ParseServer, kue-scheduler Query.every

I'm using ParseServer(

) and kue-sheduler(
), my
looks like:
Queue.every('0 12 * * *', job);
, what I expect is that the cron format will initiate the
every day at 12pm, I've tried so many formats but nothing works, after an hour or so the task initiates, maybe there is another format I should try?, is my format wrong?, is it something else?

Answer Source

Actually kue-scheduler using node-cron that uses following format

  • Seconds: 0-59
  • Minutes: 0-59
  • Hours: 0-23
  • Day of Month: 1-31
  • Months: 0-11
  • Day of Week: 0-6

that mean you cron format would be

Queue.every('00 00 12 * * *', job);

References: https://www.npmjs.com/package/kue-scheduler & https://github.com/ncb000gt/node-cron

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download