[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] I want get email always when job change status?

On 01/25/2010 07:08 AM, Matt Hope wrote:
> From: condor-users-bounces@xxxxxxxxxxx [mailto:condor-users-bounces@xxxxxxxxxxx] On Behalf Of Lukasz Marchewka
>> But i will have only notification about jobs finish, and I want have got notification when job start running, holding, release...
> For this you should use the condor_wait functionality on the user log file and trigger events yourself (you can then do anything, including emails)
> Only the shadow/schedd are fully aware of all the state transitions (the startd/starter knows about some and passes this along to the shadow)
> Matt

It would be nice if condor_wait could be told what type of event to wait on, and it could return which event was seen. The script waiting could send its email and if held or released just re-enter its loop. Something like:

STATE=$(condor_wait -states removed,completed,hold,release)
while [ $? -ge 0 ];
   email $STATE
   case $STATE in
     removed ) ...; exit;
     completed ) ...; exit;
     hold ) ...
     release ) ...
   STATE=$(condor_wait -states removed,completed,hold,release)