You are here: 17 Object Triggers > References > Job Triggers

17.11 Job Triggers

For security reasons, job triggers are disabled by default. They must be enabled in order to successfully attach triggers to jobs (See Enabling Job Triggers for more information.).

Triggers attached to jobs follow the same basic rules and formats as attaching them to other objects; however, not all attribute options are valid for each object. Jobs, like other objects, have a unique set of trigger rules. The table below details the methods, options, and other notable details associated with attaching triggers to jobs.

17.11.1 Creation Methods

Method Format Example

Command line on job creation: msub -l

msub <jobName> -l 'trig=<trigSpec>'

Attributes are delimited by backslash ampersand (\&).

 

> msub my.job -l 'trig=EType=create\&AType=exec\&Action="/jobs/my_trigger.pl"\&Offset=10:00'

Command line on existing job: mschedctl - c mschedctl -c trigger <trigSpec> -o job:<jobID>

> mschedctl -c trigger EType=end,AType=mail,Action="Job moab.54 has ended" -o job:moab.54

Job template in moab.cfgJOBCFG

JOBCFG[<templateName>] TRIGGER=<trigSpec>

JOBCFG[vmcreate] TRIGGER=,EType=end,AType=exec,Action="/tmp/jobEnd.sh"

17.11.2 Valid Event Types

17.11.3 Valid Action Types

17.11.4 Mail Recipient

The job's owner

See Using a Trigger to Send Email for more information.

© 2016 Adaptive Computing