<viztask>.schedule

Schedule a task

 

<viztask>.schedule(
    gen    

)

 

gen

A generator object to run as a task


Remarks

This command will schedule a task. When the task is finished it will automatically be removed from the scheduler.

Return Value

viztask.Task object

Example

import viztask

def MyTask():
    
    while True:
        
        yield viztask.waitTime(1)

        print '1 second elapsed'

viztask.schedule( MyTask() )