Package buildbot :: Module scheduler :: Class Nightly
[frames | no frames]

Class Nightly

ComparableMixin --+        
                  |        
    Service --+   |        
              |   |        
   MultiService --+        
                  |        
      BaseScheduler --+    
                      |    
  BaseUpstreamScheduler --+
                          |
                         Nightly


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.
Method Summary
  __init__(self, name, builderNames, minute, hour, dayOfMonth, month, dayOfWeek, branch)
  addChange(self, change)
  addTime(self, timetuple, secs)
  calculateNextRunTime(self)
  calculateNextRunTimeFrom(self, now)
  doPeriodicBuild(self)
  findFirstValueAtLeast(self, values, value, default)
  getPendingBuildTimes(self)
  isRunTime(self, timetuple)
  listBuilderNames(self)
  setTimer(self)
  startService(self)
  stopService(self)
    Inherited from BaseUpstreamScheduler
  buildSetFinished(self, bss)
  submit(self, bs)
  subscribeToSuccessfulBuilds(self, watcher)
  unsubscribeToSuccessfulBuilds(self, watcher)
    Inherited from BaseScheduler
  __repr__(self)
    Inherited from MultiService
  __iter__(self)
  addService(self, service)
  getServiceNamed(self, name)
  privilegedStartService(self)
  removeService(self, service)
    Inherited from Service
  __getstate__(self)
  disownServiceParent(self)
  setName(self, name)
  setServiceParent(self, parent)
    Inherited from ComparableMixin
  __cmp__(self, them)
  __hash__(self)

Class Variable Summary
tuple compare_attrs = ('name', 'builderNames', 'minute', 'hour...
    Inherited from BaseUpstreamScheduler
Implements __implemented__ = <implementedBy buildbot.scheduler.Base...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
    Inherited from Service
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
NoneType name = None                                                                  
NoneType parent = None                                                                  
int running = 0                                                                     

Class Variable Details

compare_attrs

Type:
tuple
Value:
('name',
 'builderNames',
 'minute',
 'hour',
 'dayOfMonth',
 'month',
 'dayOfWeek',
 'branch')                                                             

Generated by Epydoc 2.1 on Sun Dec 10 22:04:44 2006 http://epydoc.sf.net