Class Nightly
source code
twisted.application.service.Service --+
|
twisted.application.service.MultiService --+
|
util.ComparableMixin --+
|
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.
onlyIfChanged functionality
s = Nightly('nightly', ['builder1', 'builder2'],
hour=3, minute=0, onlyIfChanged=True)
When the flag is True (False by default), the build is trigged if
the date matches and if the branch has changed
fileIsImportant parameter is implemented as defined in class Scheduler
|
__init__(self,
name,
builderNames,
minute=0,
hour=' * ' ,
dayOfMonth=' * ' ,
month=' * ' ,
dayOfWeek=' * ' ,
branch=None,
fileIsImportant=None,
onlyIfChanged=False,
properties={ } ) |
source code
|
|
|
|
|
findFirstValueAtLeast(self,
values,
value,
default=None) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from BaseUpstreamScheduler :
buildSetFinished ,
submitBuildSet ,
subscribeToSuccessfulBuilds ,
unsubscribeToSuccessfulBuilds
Inherited from BaseScheduler :
__repr__
Inherited from twisted.application.service.MultiService :
__iter__ ,
addService ,
getServiceNamed ,
privilegedStartService ,
removeService
Inherited from twisted.application.service.Service :
__getstate__ ,
__providedBy__ ,
disownServiceParent ,
setName ,
setServiceParent
Inherited from util.ComparableMixin :
__cmp__ ,
__hash__
|
__init__(self,
name,
builderNames,
minute=0,
hour=' * ' ,
dayOfMonth=' * ' ,
month=' * ' ,
dayOfWeek=' * ' ,
branch=None,
fileIsImportant=None,
onlyIfChanged=False,
properties={ } )
(Constructor)
| source code
|
- Parameters:
name - name for this scheduler
properties - properties to be propagated from this scheduler
- Overrides:
twisted.application.service.MultiService.__init__
|
- Overrides:
twisted.application.service.Service.startService
|
- Overrides:
twisted.application.service.Service.stopService
|
compare_attrs
- Value:
( ' name ' ,
' builderNames ' ,
' minute ' ,
' hour ' ,
' dayOfMonth ' ,
' month ' ,
' dayOfWeek ' ,
' branch ' ,
...
|
|