3

Currently I am polling SCM

H H(0-8) * * 5

Which I intend to mean: poll between midnight and 8am on Friday.

What I would like is to poll every OTHER Friday.

edelaney05
  • 6,822
  • 6
  • 41
  • 65

3 Answers3

2

The accepted answer does not work in Jenkins:

Invalid input: "0 0-8 * * 5/2": line 1:12: unexpected token: /

So take a look at this answer (and vote that up in case it helps):

H H 8-14,22-28 * 5

"Run at some hour and some minute (see here for the meaning of H) every Friday (=the 5th day, see here), if that Friday happens to be between day 8-14 or 22-28 of month." Looks good in my local Jenkins, skipping the run on January 31st:

Would last have run at Friday, January 24, 2020 12:39:59 AM UTC; would next run at Friday, February 14, 2020 12:39:59 AM UTC.

crusy
  • 1,424
  • 2
  • 25
  • 54
  • 1
    okay... it gave the following warning messages Short cycles in the day-of-month field will behave oddly near the end of a month Would last have run at Saturday, March 28, 2020 8:02:52 AM CET; would next run at Saturday, April 11, 2020 8:02:52 AM CEST. – Jasonw Apr 07 '20 at 03:32
1

I haven't tried this in Jenkins, but I believe the normal cron syntax would be: 0 0-8 * * 5/2

Christopher Orr
  • 110,418
  • 27
  • 198
  • 193
-1

The following statement helps you to run it bi-weekly at 08:00 A.M on Friday.

00 08 */2 * 5