Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 9457b02689c69e152aa2cda68176fa51 > files > 131

buildbot-doc-0.8.4p1-2.fc16.noarch.rpm

<html lang="en">
<head>
<title>Nightly Scheduler - BuildBot Manual - 0.8.4p1</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="BuildBot Manual - 0.8.4p1">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Schedulers.html#Schedulers" title="Schedulers">
<link rel="prev" href="Periodic-Scheduler.html#Periodic-Scheduler" title="Periodic Scheduler">
<link rel="next" href="Try-Schedulers.html#Try-Schedulers" title="Try Schedulers">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This is the BuildBot manual for Buildbot version 0.8.4p1.

Copyright (C) 2005, 2006, 2009, 2010 Brian Warner

Copying and distribution of this file, with or without
modification, are permitted in any medium without royalty
provided the copyright notice and this notice are preserved.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Nightly-Scheduler"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Try-Schedulers.html#Try-Schedulers">Try Schedulers</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Periodic-Scheduler.html#Periodic-Scheduler">Periodic Scheduler</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Schedulers.html#Schedulers">Schedulers</a>
<hr>
</div>

<h4 class="subsection">4.8.7 Nightly Scheduler</h4>

<p><a name="index-buildbot_002eschedulers_002etimed_002eNightly-62"></a>
This is highly configurable periodic build scheduler, which triggers
a build at particular times of day, week, month, or year. The
configuration syntax is very similar to the well-known <code>crontab</code>
format, in which you provide values for minute, hour, day, and month
(some of which can be wildcards), and a build is triggered whenever
the current time matches the given constraints. This can run a build
every night, every morning, every weekend, alternate Thursdays,
on your boss's birthday, etc.

   <p>Pass some subset of <code>minute</code>, <code>hour</code>, <code>dayOfMonth</code>,
<code>month</code>, and <code>dayOfWeek</code>; 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. 
The full list of parameters is:

     <dl>
<dt><code>name</code>
<br><dt><code>builderNames</code>
<br><dt><code>properties</code>
<br><dt><code>fileIsImportant</code>
<br><dt><code>branch</code><dd>(required) The branch to build when the time comes.  Remember that a value of
<code>None</code> here means the default branch, and will not match other branches!

     <br><dt><code>change_filter</code><dd>see <a href="Configuring-Schedulers.html#Configuring-Schedulers">Configuring Schedulers</a>.  Note that <code>fileIsImportant</code> and
<code>change_filter</code> are only relevant if <code>onlyIfChanged</code> is true.

     <br><dt><code>minute</code><dd>The minute of the hour on which to start the build.  This defaults
to 0, meaning an hourly build.

     <br><dt><code>hour</code><dd>The hour of the day on which to start the build, in 24-hour notation. 
This defaults to *, meaning every hour.

     <br><dt><code>dayOfMonth</code><dd>The day of the month to start a build.  This defauls to *, meaning every day.

     <br><dt><code>month</code><dd>The month in which to start the build, with January = 1.  This defaults
to *, meaning every month.

     <br><dt><code>dayOfWeek</code><dd>The day of the week to start a build, with Monday = 0.  This defauls to *,
meaning every day of the week.  If <code>dayOfMonth</code> and <code>dayOfWeek</code> are
both specified, builds will be started when <em>either</em> parameter matches.

     <br><dt><code>onlyIfChanged</code><dd>If this is true, then builds will not be scheduled at the designated time
<em>unless</em> the specified branch has seen an important change since the
previous build.

   </dl>

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

<pre class="example">     from buildbot.schedulers import timed
     s = timed.Nightly(name='nightly',
             branch='master',
             builderNames=['builder1', 'builder2'],
             hour=3,
             minute=0)
</pre>
   <p>This scheduler will perform a build each monday morning at 6:23am and
again at 8:23am, but only if someone has committed code in the interim:

<pre class="example">     s = timed.Nightly(name='BeforeWork',
              branch='default',
              builderNames=['builder1'],
              dayOfWeek=0,
              hour=[6,8],
              minute=23,
              onlyIfChanged=True)
</pre>
   <p>The following runs a build every two hours, using Python's <code>range</code>
function:

<pre class="example">     s = timed.Nightly(name='every2hours',
             branch=None, # default branch
             builderNames=['builder1'],
             hour=range(0, 24, 2))
</pre>
   <p>Finally, this example will run only on December 24th:

<pre class="example">     s = timed.Nightly(name='SleighPreflightCheck',
             branch=None, # default branch
             builderNames=['flying_circuits', 'radar'],
             month=12,
             dayOfMonth=24,
             hour=12,
             minute=0)
</pre>
   </body></html>