Timer

Timer schedules a callback to a job or joblet method. Timers can schedule a one time or a repeated callback on an interval basis. Any Timers created in a job or joblet are shut down on job or joblet completion.

Constructor

Timer Construct a one-time Timer instance

Methods

Summary:

Timer(PyMethod method)

Construct a one-time Timer instance

Timer(PyMethod method)

Construct a Timer that repeatedly calls the method.

cancel()

Stop this timer.

Example

VmSpec here is used for creating a clone on a named host from a template resource:

resource = getMatrix().getGridObject(TYPE_RESOURCE,"myTemplate")      spec = VmSpec() spec.setNewName("newvm") spec.setHost('vmhost-qa')      resource.clone(spec)

See Also

Javadoc: Timer