Running cron job/task at every hour [duplicate]
Asked Answered
G

1

13

Which one is the correct syntax for running a job at every hour?

0 0 * * * *

0 0 */1 * * *

Also how are they both different?

Grays answered 25/11, 2021 at 7:46 Comment(2)
Check out crontab guru. It can tell you when the different timings runDesirous
@Desirous I did check it out but I wanted to know how are they both different because they are doing the same work for me.Grays
K
21

The correct syntax for every hour job is 0 * * * *.

But you can use both 0 0 * * * * and 0 0 */1 * * * Since */1 means every 1 hour/minute/second like the *.

Koziara answered 25/11, 2021 at 7:51 Comment(1)
they both are doing the same work for me, running at every hourGrays

© 2022 - 2024 — McMap. All rights reserved.