Houdini 18.5 Nodes TOP nodes

Python Scheduler TOP node

A Python-based programmable Scheduler for PDG.

Since 17.5

This node provides an interface to write Python code for a custom PDG Scheduler and use it to schedule work items. The base Scheduler’s callbacks are exposed as Python text fields which should be filled in according to their function definition. Each callback field is then evaluated and executed during the general PDG work item schedule workflow. The Scheduler node API reference has a detailed explanation for each of the callback functions that you can implement.

The Python Scheduler node can be used as is in a TOP network, or it can be saved out to a Python file using the Save To Python button. The Save To Python functionality will write out a complete implementation of a custom Scheduler node with the filled in callback entries. The Python file should be placed in the PDG Python path (e.g. /home/username/houdini17.5/pdg/types/) so that it will be automatically picked up and registered with the Scheduler Factory. This happens on the launch of Houdini, which means changes to the custom Scheduler will require a relaunch of Houdini.

Once registered, the custom Scheduler node can be created by selecting it from the TAB menu under Schedulers. If it does not show up there, either the Python file was not found by Houdini at launch, or the Python file has errors.


Save To Python

Save this node out to a Python file, along with its custom callback entries.

Working Directory

Specifies the relative directory where the work generates intermediate files and output. The intermediate files are placed in a subdirectory. For the Local Scheduler or HQueue, typically $HIP is used. For other schedulers, this should be a relative directory to Local Shared Root Path and Remote Shared Root Path; this path is then appended to these root paths.

Validate Output Files

When enabled, PDG will check the output files of cooked work items to see if they still exist on disk. Work items that are missing output files will be dirtied and cook again.



onSchedule Callback

Called when a work item needs to scheduled. Returns True if the work item has been successfully scheduled.

Schedule Static

onScheduleStatic Callback

Called when the scheduler should process a static dependency graph.

Submit As Job

submitAsJob Callback

Called when the scheduler should cook the entire TOP Network as a standalone job. Returns the status URI for the submitted job.

Initialization and Cleanup


onStart Callback

Called when the scheduler is registered with PDG. Should initialize or setup scheduler state.


onStop Callback

Called when the scheduler is unregistered with PDG. Should clean up scheduler state.

Start Cook

onStartCook Callback

Called when a cook starts, before any work items are scheduled. Returns False to cancel the cook, True otherwise.

Stop Cook

onStopCook Callback

Called when cook completes or is canceled. Return value is ignored.

Shared Server

End Shared Server

endSharedServer Callback

Closes an existing shared server instance. Returns True on success.

Transfer File

transferFile Callback

Called when a file should be copied from the local machine to a remote location (e.g. a shared network drive). These would be files that are necessary to do the wok, so they are copied to the working directory. Returns True if copied the file.



getLogURI Callback

Returns the URI that points to the log of the given work item (e.g. file:///myfarm/tasklogs/jobid20.log).

Status URI

getStatusURI Callback

Returns the URI that points to the status of the given work item (e.g. http://myfarm/status/jobid20)

See also

TOP nodes