Jenkins: how to run task every 30 days Jenkins version is 2.235.5 (I should update it to next LTS version 2.249).
I configured Jenkins to run a job periodically every 30 days: Build Triggers → Build periodically → Schedule:
H 3 */30 * *

And now I see:

Would last have run at Saturday, October 31, 2020 3:20:39 AM EDT; would next run at Sunday, November 1, 2020 3:20:39 AM EST.


So it will be started again after 1 day, not 30 days…
How to run a job periodically every 30 days?
Update: history of Jenkins &quot;predictions&quot; for schedule above (job was created October 28):

Would last have run at Thursday, October 1, 2020 3:20:06 AM EDT; would next run at Saturday, October 31, 2020 3:20:06 AM EDT.


Would last have run at Saturday, October 31, 2020 3:20:39 AM EDT; would next run at Sunday, November 1, 2020 3:20:39 AM EST.


Would last have run at Sunday, November 1, 2020 3:20:43 AM EST; would next run at Tuesday, December 1, 2020 3:20:43 AM EST.
In short, it's not practically possible. This S/O answer is quite detailed.

Jenkins used a cron
expression, and
the different fields are:
MINUTES Minutes in one hour (0-59)
HOURS Hours in one day (0-23)
DAYMONTH Day in a month (1-31)
MONTH Month in a year (1-12)
DAYWEEK Day of the week (0-7) where 0 and 7 are sunday


cron syntax simply does not support every n days.
An impractical option wuld be to have a daily job with a Conditional BuildStep to calculate if this day is n × 30 days from a given fixed day and abort if not..
But every 30 days doesn't really align w/calendar anyways, so is that really the intent?