Apparently Jeninks is using the cron format, common on Linux systems. So what your instruction is saying is: "perform the task once every minute (*
) of the hour 3
, every day (*
), every month (*
), any day of the week (*
)". For your task to run every 3 hours, a way would be:
0 0,3,6,9,12,15,18,21 * * *
Detailing:
0
- the task will always run at zero minute (accepted 0-59
);
0,3,6,9,12,15,18,21
- the task will run at zero hour, at three, at six... (accepts 0-23
);
*
- the task will run every day (accepted 1-31
);
*
- the task will run every month (accepted 1-12
);
*
- the task will perform any day of the week (accepted 0-6
, where 0
is "Sunday").
That is, you specify in which minute of the hour you want it to run, and in what hours. The rest you leave as *
(applies to all). The second instruction (hour) can be simplified in this way:
0 */3 * * *
In that case the */3
means "every three [hours]" - but without specifying the initial time. In this case, I’m not sure at what times the task would perform, except that there will be a 3-hour interval between one execution and another.
That one *
can also be replaced by an explicit interval. A more complex example:
15 0-6/2 * * 0,3
"Every Sunday and every Wednesday, every two hours at dawn, at minute 15" That is to say: 00:15
, 02:15
, 04:15
and 06:15
(note that the interval is closed).
Note: this answer assumes that Jenkins correctly and fully implements the Cron format; if only one subset If supported, some of the above options may not be available. I suggest you run some tests to determine if a certain instruction works as expected.