Next: , Up: Schedulers


4.8.1 Configuring Schedulers

c['schedulers'] is a list of Scheduler instances, each of which causes builds to be started on a particular set of Builders. The two basic Scheduler classes you are likely to start with are Scheduler and Periodic, but you can write a customized subclass to implement more complicated build scheduling.

Scheduler arguments should always be specified by name (as keyword arguments), to allow for future expansion:

     sched = Scheduler(name="quick", builderNames=['lin', 'win'])

There are several common arguments for schedulers, although not all are available with all schedulers.

name
Each Scheduler must have a unique name. This is used in status displays, and is also available in the build property scheduler.
builderNames
This is the set of builders which this scheduler should trigger, specified as a list of names (strings).
properties
This is a dictionary specifying properties that will be transmitted to all builds started by this scheduler. The owner property may be of particular interest, as its contents (as a list) will be added to the list of "interested users" (see Doing Things With Users) for each triggered build. For example:
          sched = Scheduler(...,
              properties = { 'owner' : [ 'zorro@company.com', 'silver@company.com' ] })

fileIsImportant
A callable which takes one argument, a Change instance, and returns True if the change is worth building, and False if it is not. Unimportant Changes are accumulated until the build is triggered by an important change. The default value of None means that all Changes are important.
change_filter
The change filter that will determine whch changes are recognized by this scheduler; see Change Filters. Note that this is different from fileIsImportant: if the change filter filters out a Change, then it is completely ignored by the scheduler. If a Change is allowed by the change filter, but is deemed unimportant, then it will not cause builds to start, but will be remembered and shown in status displays.

The remaining subsections represent a catalog of the available Scheduler types. All these Schedulers are defined in modules under buildbot.schedulers, and the docstrings there are the best source of documentation on the arguments taken by each one.