This is highly configurable periodic build scheduler, which triggers
a build at particular times of day, week, month, or year. The
configuration syntax is very similar to the well-known crontab
format, in which you provide values for minute, hour, day, and month
(some of which can be wildcards), and a build is triggered whenever
the current time matches the given constraints. This can run a build
every night, every morning, every weekend, alternate Thursdays,
on your boss's birthday, etc.
Pass some subset of minute
, hour
, dayOfMonth
,
month
, and dayOfWeek
; each may be a single number or
a list of valid values. The builds will be triggered whenever the
current time matches these values. Wildcards are represented by a
'*' string. All fields default to a wildcard except 'minute', so
with no fields this defaults to a build every hour, on the hour.
The full list of parameters is:
name
builderNames
properties
branch
minute
hour
month
dayOfWeek
onlyIfChanged
For example, the following master.cfg clause will cause a build to be started every night at 3:00am:
from buildbot.schedulers import timed s = timed.Nightly(name='nightly', builderNames=['builder1', 'builder2'], hour=3, minute=0)
This scheduler will perform a build each monday morning at 6:23am and again at 8:23am, but only if someone has committed code in the interim:
s = timed.Nightly(name='BeforeWork', builderNames=['builder1'], dayOfWeek=0, hour=[6,8], minute=23, onlyIfChanged=True)
The following runs a build every two hours, using Python's range
function:
s = timed.Nightly(name='every2hours', builderNames=['builder1'], hour=range(0, 24, 2))
Finally, this example will run only on December 24th:
s = timed.Nightly(name='SleighPreflightCheck', builderNames=['flying_circuits', 'radar'], month=12, dayOfMonth=24, hour=12, minute=0)