Scheduler for sequential jobs on Linux

0

I am running some programs over a cluster and I would like to run them in a sequence, i.e when the first program terminates the second one starts and so on. This is so that my cluster does not exceed its bandwidth and its memory pool. Crontab is not what I am looking for because I do not know when the program finishes. Is there a way I can run my programs in this manner?

Edgar

Posted 2013-01-06T14:10:16.400

Reputation: 1

3How do you start your programs? E.g. on a non cluster you could do program1 ; program2 ; program3 to start three programs sequantially, or program1 && program2 to start program 2 after program1 has succesfully ended. ( && for success, || for failure). – Hennes – 2013-01-06T14:36:14.470

To add to @Hennes' response, one can use parentheses to group commands if the priorities are unhelpful - && is higher-priority than ||, which can be thought of as higher-priority than ;. – Darael – 2013-01-06T19:08:36.770

Answers

0

You could execute remote commands via SSH, where one of the server run as the central script execution. You can use key-based authentication. Below is an example of a script file, the script are executed one by one,

ssh root@MachineA 'bash -s' < local_scriptA.sh
ssh root@MachineB 'bash -s' < local_scriptB.sh
ssh root@MachineC 'bash -s' < local_scriptC.sh

neo

Posted 2013-01-06T14:10:16.400

Reputation: 564