ScheduleSpec

Defines one or more joblets to be scheduled and run on resources. A ScheduleSpec instance is passed to the job’s schedule(). schedule() creates the joblets and schedules joblets to run on resources.

Constructor

ScheduleSpec Construct a ScheduleSpec with defaults.

Methods

Summary:

ScheduleSpec()

Construct a ScheduleSpec with defaults.

setParameterSpace(ParameterSpace parameterSpace)

Assign an optional ParameterSpace for this ScheduleSpec.

getParameterSpace()

Retrieve the supplied ParameterSpace for this ScheduleSpec.

setCount(int count)

Assign the number of joblets to create for this set.

getCount()

Retrieve number of joblets created for this set. Only valid after <code>scheduleSweep()</code>.

setJobletClass(PyClass jobletClass)

Assign the Joblet class to use for joblet execution on the resource.

getJobletClass()

Retrieve the Joblet class to schedule no a resource

setConstraint(Constraint constraint)

Assign a Constraint for resource selection. This additional Constraint is ANDed to any existing constraints including the aggregated Policies:

constraint = EqConstraint() constraint.setFact("resource.os.name") constraint.setValue("Windows XP") ScheduleSpec = ScheduleSpec() ScheduleSpec.setJobletClass(MyJoblet) ScheduleSpec.setConstraint(constraint)
getConstraint()

Retrieve constraint object

setConstraint(String constraint)

Assign a Constraint in XML for resource selection. This additional Constraint is AND'd to any existing constraints including the aggregated Policies:

ScheduleSpec = ScheduleSpec() ScheduleSpec.setJobletClass(MyJoblet) ScheduleSpec.setConstraint("<eq fact=\"resource.os.name\" value=\"Windows XP\" />")
getConstraintStr()

Retrieve constraint object

setUseNodeSet(int nodeSet)

If set to true, the joblet set is constructed after applying resource constraints to the set of provisionable resource. If false (the default) the active or online set of resources is used instead.

getUseNodeSet()

setJobletArgs(PyDictionary facts)

Define facts for this jobletargs namespace for a Joblet. Each joblet created for this schedulet gets a copy of this set of joblet arguments facts.

getJobletArgs()

setJobletFacts(PyDictionary facts)

Define additional joblet facts for this ScheduleSpec. Each joblet created for this set inherits the base set of joblet facts and any facts supplied to this function.

getJobletFacts()

Example

ScheduleSpec here is used to schedule a single joblet:

s = ScheduleSpec() s.setJobletClass(MyJoblet) self.schedule(s) 

See Also