Job Processor Scripting
A Job Processor script is a PHP code, which runs in the context of a job being processed. The script runs after a job has been parsed and all user/queue policies have been applied. It runs before the job is made ready
or paused
.
The typical usage of the script is the modification of the job based on its properties. For example:
if ($this->pageCount > 10) {
$this->duplex = "longEdge";
}
In this example, if the job has more than 10 pages, it's released as duplex. $this
is the job being processed. It's an instance of the Job
class.
Basic PHP functions can be used. For MyQ specific classes and functions, see Job Scripting Reference.
To set up processing via the PHP script, go to the properties panel of the queue where you want to use it, open the Job processing tab, and go to the Scripting (PHP) section. Under Actions after processing, enter the script in the box.
Please note, editing scripting may be disabled or enabled in your Easy Config security settings. If it is disabled, a note will be added to the Scripting (PHP) section of this menu.
![Actions after processing properties sub-tab](../../../__attachments/1262780576/QueuePHP.png?inst-v=f576f6b0-eb9f-4035-8724-3dad44b7106e)