Default interval of 1s not respected #268
Answered
by
Hexagon
RahulGautamSingh
asked this question in
Q&A
-
When using the above schedule and trying to get the To reproduce you can execute this snippet: import { Cron } from "croner";
const job = new Cron("* 21 * * *");
console.log(job.nextRuns(10)); |
Beta Was this translation helpful? Give feedback.
Answered by
Hexagon
Dec 4, 2024
Replies: 1 comment
-
Hello 👋 When using a five part pattern like What you probably want is a six part pattern |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
RahulGautamSingh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello 👋
When using a five part pattern like
* 21 * * *
, the first part represents minutes. So this is every minute, hour 21, and so on... Seconds is defaulted to 0 (just like system cron).What you probably want is a six part pattern
* * 21 * * *
, where the first part indicates seconds.