Event type of qhold?

Hi, forks,
i know there is 2 ways of hold a job,

  1. qalter
    qalter -h u 1.head
  2. qhold
    qhold -h u 1.head

but actually there are differences.
the first one will successfully trigger the event pbs.MODIFYJOB
the later one will not
is it intention?
is there any trigger of qhold with hooks?

thanks

I am not sure about the intention here, my understand is as below ( and please correct me if i am wrong)

qalter can change the resource request/attributes of a job and can change the life cycle of a job with respect to scheduling policy(direction)

qhold would be like pause and play (qrls) , you are not altering the resources requested for a job.

[pbsdata@pbspro ~]$ qstat
Job id            Name             User              Time Use S Queue
----------------  ---------------- ----------------  -------- - -----
634.pbspro  STDIN            pbsdata                  0 Q workq
[pbsdata@pbspro ~]$ qstat -f | grep -i hold
    Hold_Types = n
[pbsdata@pbspro ~]$ qalter -h u 634
[pbsdata@pbspro ~]$ qstat -f | grep -i hold
    Hold_Types = u
[pbsdata@pbspro ~]$ qhold -h u 634
[pbsdata@pbspro ~]$ qstat -f | grep -i hold
    Hold_Types = u
[pbsdata@pbspro ~]$ qrls 634
[pbsdata@pbspro ~]$ qstat -f | grep -i hold
    Hold_Types = n

However, in respective hook events if you would like execute any tasks based on the Hold_Type set you can certainly do

Thank you

Hi, Adarsh,
modify event will only be triggled by server level change( not sched level change, IIRC, states in big book)

i’ve completely agreed with you could do something like modify hold type in hooks, my concern is that use qalter to hold and qrls to hold a job actually have differences in the design ( one’ll trigger modify hook , one will not), and i dont know if it is an intention, or some one could explain what’s the difference beneath them.

Thanks

1 Like