0

I want to run a job on every Monday once.

I tried

agenda.every('* * * * * 1', 'Weekly keyworker report');

But it executes a every seconds.I am confused to use that. I am working based on this package.

Sakthivel
  • 139
  • 1
  • 16

1 Answers1

2

Unlike UNIX cron, node-cron supports seconds and has six fields instead of five.

* * * * * 1 means every seconds on Monday.

You have to change it to something like this:
00 30 10 * * 1 which means every Monday at 10h30.

TGrif
  • 5,725
  • 9
  • 31
  • 52