I am trying to append exit statement to my pbs script file using a hook.
This is the hook that I have created
import pbs
def job_submission_hook(event):
job = event.job
job_script = job.script
# Append 'exit' to the job script
job.script = job_script.rstrip() + "\nexit\n"
job_submission_hook(pbs.event())
It gives the following error-
qsub: request rejected as filter hook ‘append_exit’ encountered an exception. Please inform Admin