You are not logged in.

#1 2007-05-19 09:21:46

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Putting bash jobs on queue?

Is there a way to put bash jobs on queue?
As queue I mean that only a job work at time and all others stay in 'Stopped' status until the one is going ends.
And finally an other starts... Repeat until no jobs are on queue.

If it does not, I'd like making a bash script for doing it, and I just need to know if there is a way to start a job in the stopped status or at least if there is a way to stop is asap.

thanks

Offline

#2 2007-05-19 14:09:15

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: Putting bash jobs on queue?

job1 && job2 && job3

the queue only advances if the job before ended with success (RETURN 0). if not, it'll stop.
if you expect something to fail but still want to continue, throw a successful state when ending the job so that the next can continue.

but i really suggest you read the bash docs. this topic can get rather complicated. smile

Last edited by kth5 (2007-05-19 14:09:31)


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#3 2007-05-19 14:33:16

lessthanjake
Member
From: Norway
Registered: 2005-11-09
Posts: 319
Website

Re: Putting bash jobs on queue?

&& only helps if you know all jobs you are going to run from the beginning. But to write a small and simple queue system shouldn't be to hard, just using $!, some loops and sleep. For more advaced queue systems there are plenty to choose from, like condor or openpbs.

Offline

Board footer

Powered by FluxBB