I am trying to run a node-cron job every 3 hours and I am not sure if I am doing it right.
Right now I am using:
* * */8 * * *
Is this correct?
You can set the cron for every three hours as: 0 */3 * * * your command here ..
basic 3. /usr/bin/vim. tiny 4. /bin/ed Choose 1-4 [1]: Make a new line at the bottom of this file and insert the following code. Of course, replace our example script with the command or script you wish to execute, but keep the */5 * * * * part as that is what tells cron to execute our job every 5 minutes.
You should zero-out the second and minute values, and use a step of /3. The cron expression for this is
0 0 */3 * * *
Which evaluates to 'At 0 seconds, 0 minutes every 3rd hour'.
Your current expression * * */8 * * *
would try to run every second of every minute past every 8th hour.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With