I understand that epilogue will run some commands after any job finishes. What I want is an epilogue for only certain jobs and that epilogue is different for each of the jobs.
Specifically I want certain commands to be run after a job is killed due to wall time.
The generic $PBS_HOME/mom_priv/epilogue is replaced using execjob_epilogue hook.
Also you have execjob_end hook. Based on what attribute values are available for these these hook events , you can implement your own logic to identify the job and decide to execute or not.
Thanks. I think the hooks option may be too complicated for me . I only need the custom epilogue for jobs that get assigned to one particular node. So on that node I made this epilogue script which seems to work ok: