[Buildbot-devel] Nightly Scheduler

Jim Tink z3132741 at student.unsw.edu.au
Fri Feb 1 03:53:42 UTC 2008


I don't know why this isn't in the manual anyway:

class Nightly(BaseUpstreamScheduler):
    """Imitate 'cron' scheduling. This can be used to schedule a nightly
    build, or one which runs are certain times of the day, week, or month.

    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.

    For example, the following master.cfg clause will cause a build to be
    started every night at 3:00am::

     s = Nightly('nightly', ['builder1', 'builder2'], hour=3, minute=0)
     c['schedules'].append(s)

    This scheduler will perform a build each monday morning at 6:23am and
    again at 8:23am::

     s = Nightly('BeforeWork', ['builder1'],
                 dayOfWeek=0, hour=[6,8], minute=23)

    The following runs a build every two hours::

     s = Nightly('every2hours', ['builder1'], hour=range(0, 24, 2))

    And this one will run only on December 24th::

     s = Nightly('SleighPreflightCheck', ['flying_circuits', 'radar'],
                 month=12, dayOfMonth=24, hour=12, minute=0)

    For dayOfWeek and dayOfMonth, builds are triggered if the date matches
    either of them. All time values are compared against the tuple returned
    by time.localtime(), so month and dayOfMonth numbers start at 1, not
    zero. dayOfWeek=0 is Monday, dayOfWeek=6 is Sunday.
    """



> On Jan 31, 2008 10:18 PM, Jim Tink <z3132741 at student.unsw.edu.au> wrote:
>> Does anyone know how to use the Nightly Scheduler? Or Does anyone know
>> where I can get information on how to use the Nightly scheduler?
>
> The Buildbot manual mention it, but the writeup in
> buildbot/scheduler.py is pretty good.
>
> If you write up some documentation for the scheduler to stick into the
> manual, then we can include it in the next release.  What a deal!
>
> Dustin
>
> --
> Storage Software Engineer
> http://www.zmanda.com
>






More information about the devel mailing list