Appendices > Prologue and epilogue scripts

Appendix G: Prologue and epilogue scripts

TORQUE provides administrators the ability to run scripts before and/or after each job executes. With such a script, a site can prepare systems, perform node health checks, prepend and append text to output and error log files, cleanup systems, and so forth.

The following table shows which MOM runs which script. All scripts must be in the TORQUE_HOME/mom_priv/ directory and be available on every compute node. "Mother Superior," as referenced in the following table, is the pbs_mom on the first node allocated, and the term "Sisters" refers to pbs_moms, although note that a Mother Superior is also a sister node.

The execution directory for each script is TORQUE_HOME/mom_priv/.

Script Execution location Execute as File permissions
prologue Mother Superior root Readable and executable by root and NOT writable by anyone but root (e.g., -r-x-----)
epilogue root
prologue.user user Readable and executable by root and other (e.g., -r-x---r-x)
epilogue.user user
prologue.parallel Sister root Readable and executable by root and NOT writable by anyone but root (e.g., -r-x-----)
epilogue.parallel root
prologue.user.parallel Mother Superior user Readable and executable by root and other (e.g., -r-x---r-x)
epilogue.user.parallel user
epilogue.precancel

Mother Superior

This script runs after a job cancel request is received from pbs_server and before a kill signal is sent to the job process.

user Readable and executable by root and other (e.g., -r-x---r-x)

epilogue.parallel is available in version 2.1 and later.

This section contains these topics: