Question

I am using sun grid engine 6.2u5 version . where requirement is when I submit job on using qsub command on completion job i want to run some script(bash scripts).

how can i use -notify option or any other way to track job completion and after completion execute script.

Thanks

Was it helpful?

Solution

I think hold_jid is what you're looking for:

qsub -hold_jid jobToWaitFor bashScript

You can also specify multiple jobs to wait for by separating them with commas.

OTHER TIPS

There is a dedicated option for that in the queue configuration. You can set a "Prolog" or "Epilog" script that will be executed before and after the job respectively. See man queue_conf or http://gridscheduler.sourceforge.net/htmlman/htmlman5/queue_conf.html.

If '-hold_jid' is not available on your system, you can try '-depend', but it requires two commands.

>> qsub script_a.sh
555.server.domain.com 

>> qsub -W depend=afterok:555.server.address.com script_b.sh
556.server.domain.com

Check this answer to wait on the completion of multiple jobs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top