node-cron
node-cron copied to clipboard
unable to run every x minutes
Hi, Thank you everyone involved for their contribution.
0 */10 * * * * is given in the example for cron to run every 10 min.
This runs every 10 min but for every second !!! So it runs the function 60 times !! Then it waits 10 min and does that again.
Also tried following combinations without success:
- */10 * * * * 1-59 */10 * * * *
Can you advise?
Thanks TeaCii
Hi, Thank you everyone involved for their contribution.
0 */10 * * * * is given in the example for cron to run every 10 min.
This runs every 10 min but for every second !!! So it runs the function 60 times !! Then it waits 10 min and does that again.
Also tried following combinations without success:
- */10 * * * * 1-59 */10 * * * *
Can you advise?
Thanks TeaCii
Hi.
I don't know if I understood your question correctly, but come on.
0 * / 10 * * * *
causes the function to run every 10 minutes.
If you want it to be executed every second you must use
* * * * * *
as example in examples/is_job_running.js
HI, You understood it right. I want to run every 10 min. And 0 */10 * * * * Runs every 10 min but 60 times. Rephrased, it runs 60 times every 10 min.
No I do not want it executed every second. So something is obviously up.
Dear @jomapps
If you run every 10 minutes. Your cron expression is wrong. It should be */10 * * * *
Check at https://crontab.guru/every-10-minutes
@kaungyeehein that is incorrect, this library has an extra field for seconds which crontab guru does not account for.
Every 10 minutes is 0 */10 * * * *