[GE dev] Run-Conditions for jobs

reuti reuti at staff.uni-marburg.de
Thu Feb 26 21:35:00 GMT 2009


Hi,

there was recently the program "gnubatch" released. Although it's not  
a full blown queuingsystem and delivering jobs only locally (unless  
you send the jobs to other machines by hand), it has nice features.  
One website was more comparing it to cron, and for this it is  
enhanced compared to the usual cron. One feature caught my eye: jobs  
can set and test variables in the gnubatch program. Short example  
with two custom defined ones (could be also strings):

$ gbch-r -c 'RUNS<10' -f S -s 'RUNS+=1' -f N -s 'EXITS+=1' -f E -s  
'RUNS-=1' myjob.sh

- start as long as RUNS is lower than 10
- increment RUNS when the job starts
- increment EXITS when the job exits normal
- decrement RUNS when the job exited with an error

Imagine, after 10 runs of such jobs you need a housekeeping job to  
copy stuff to a tape, another directory or server, you could have a  
repeating job hanging around all the time:

$ gbch-r -c 'EXITS=10' -f N -s 'RUNS=0' -s 'EXITS=0' housekeeping.sh

- start when EXITS equals 10
- set RUNS and EXITS to 0 at the end of the job


I like the general idea, although it will need some rework to be put  
in a multiuser environment (variables would need to be bound to a  
user or project).

-- Reuti

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=39&dsMessageId=115491

To unsubscribe from this discussion, e-mail: [dev-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list