Custom Policy implementation is done using a script file plug-in written in Perl.
The following qb.conf parameters must be set appropriately:
supervisor_policy_binding = Perl
supervisor_policy_library = path_to_script
To create a new custom supervisor policy, the developer must create a Perl module with the following Perl subroutines:
- qb_init()
- qb_approve_modify($oldjob, $newjob)
- qb_approve_submit($job)
- qb_calcstatus($subjobstatus, $agendastatus)
- qb_sudo_admin($username, $job)
A function, if not defined will, automatically be overridden with the "Default Policy".
Here are details on each subroutine.