Skip to content

Commit

Permalink
Fix Nightly Scheduler docstring - specify Scheduler arguments by name
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Armstrong committed May 7, 2010
1 parent c40b188 commit 30c3a64
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions buildbot/schedulers/timed.py
Expand Up @@ -130,22 +130,25 @@ class Nightly(base.BaseScheduler, base.ClassifierMixin, TimedBuildMixin):
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)
s = Nightly(name='nightly', builderNames=['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'],
s = Nightly(name='BeforeWork', builderNames=['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))
s = Nightly(name='every2hours', builderNames=['builder1'],
hour=range(0, 24, 2))
And this one will run only on December 24th::
s = Nightly('SleighPreflightCheck', ['flying_circuits', 'radar'],
s = Nightly(name='SleighPreflightCheck',
builderNames=['flying_circuits', 'radar'],
month=12, dayOfMonth=24, hour=12, minute=0)
For dayOfWeek and dayOfMonth, builds are triggered if the date matches
Expand All @@ -166,7 +169,8 @@ def isSourceFile(change):
if fn.endswith('.c') or fn.endswith('.h'):
return True
return False
s = Nightly('nightly-when-changed', ['builder1'], hour=3, minute=0,
s = Nightly(name='nightly-when-changed', builderNames=['builder1'],
hour=3, minute=0,
onlyIfChanged=True, fileIsImportant=isSourceFile)
onlyIfChanged defaults to False, which means a build will be performed
Expand Down

0 comments on commit 30c3a64

Please sign in to comment.