From: Houssam MOUDJEB <houssam.moudjeb@xxxxxxxxxxx> Date: 02/01/2016 09:20 AM
> I am interested in using the "hooks" to trigger a particular
action when a
> job is submitted.
> In the condor manual (section 4.4 hooks/prepare job) it's explained
how to use it.
>
> But the user has to tell condor in his submit file he wants to use
a hook.
> Is there a way to use particular hooks by default? If yes, would it
be
> possible to have the link to the documentation please ?
>
> thank you in advance.
You're looking for the SUBMIT_EXPRS configuration
setting. This specifies the names of attributes to add to each job submitted
to the pool. I use it for a RemoteCpuUtilizationPercent attribute. In the
/etc/condor/config.d/701cpupercent:
As a result, each job gets this attribute. The same
would go for defining the hook for every job.
You'd probably want to figure out an _expression_ with
an ifThenElse(), however, since if a submitter is using a different hook
prefix you wouldn't necessarily want to override it. There may be a better
approach for what you're doing than using a hook.