In bioinformatics, it is common submit jobs to grid servers. In many cases, those grid jobs have dependencies on other jobs: one job shall only start after certain jobs have finished. For example, in the Tuxedo workflow for RNA-seq, cufflinks always run after (successful) tophat alignment and cuffdiff always runs after cuffdiff. The -hold_jid option in qsub command help to solve the dependency needs:
Your job 737624 (“CM_HCC_7_9”) has been submitted
$qsub -hold_jid 737624 ../scripts/cuffdiff_7_9.qsub
Your job 737625 (“CD_HCC_7_9”) has been submitted
737624 0.50284 CM_HCC_7_9 me r 01/18/2013 09:53:50 firstname.lastname@example.org 8
737625 0.00000 CD_HCC_7_9 me hqw 01/18/2013 09:54:28
Note the “hqw” status in the second job indicates this job is on hold. In case the dependency is on more than one job, a list of jobs can be put in the -hold_jid option.
More information about this option and the grid environment can found from here.