Issue
I only want to run once in a month, every 3rd Friday at 11 pm. I tried a cron expression “0 23 ? * FRI#3” in the Jenkinsfile. It shows a syntax error. What would be the correct expression?
parameterizedCron('''
0 23 ? * FRI#3 %INPUT-CHOICE=XXX; HOSTS=YYY
''')
Solution
I am not sure FRI#3
is supported, but you can emulate that behavior with 0 23 15-21 * 5
Translated: run at 23:00/11 PM (0 23
), on a Friday (5
), on the 15th up to and including the 21th (15-21
) day of the month, each month (*
). On the 15-21th day of each month only one Friday can occur; the 3rd Friday of the month.
Answered By - Sir.Chefcoq Answer Checked By - Senaida (WPSolving Volunteer)