Execute job with hooks

Hi all,

I tried setting the “scheduling” (server attribute) to False and then running a job by using an Hook.
I tried with a “queuejob” event hook with the following issue:

If I create a new job (just a simple one like ‘echo “sleep 10” | qsub’), it correctly handles the event but in the hook I cannot read the job.id attribute (it is an empty string) and then I cannot run a command like ‘qrun JOBID’.

Any suggestions?
Thanks for helping

You would not get the jobid in queuejob hook event.
It is also not a good idea or recommended to run pbs commands in the hooks.

Please check the PBS Pro hooks guide , there is a table which decribes which attributes are settable / readable etc . JobID is created once the job is accepted and hence at the queuejob level it is not yet avaialble.