1 |
J. Roeleveld <joost@××××××××.org> wrote: |
2 |
> |
3 |
> Depends on the specific requirements. |
4 |
> If you want: |
5 |
|
6 |
In a sense, most you require can be done with my mentioned "schedule" |
7 |
tool, although perhaps the usage is not in the way you expected. |
8 |
I reorder your points for a clearer explanation: |
9 |
|
10 |
> - have schedules operate over multiple machines (eg. part run on |
11 |
> database, some on a compute-cluster, some other bit making nice graphs |
12 |
> and printing it,...) |
13 |
|
14 |
Since "schedule" can use TCP for communication, this should not be |
15 |
a problem if you let "schedule-server" listen world-wide |
16 |
(export SCHEDULE_SERVER_OPTS=-a0.0.0.0) |
17 |
|
18 |
For the actual scheduling you must setup your machines correspondingly: |
19 |
Queue on one machine the task doing the database access you want |
20 |
(with "schedule -a[serveraddress] queue command_to_access_database") |
21 |
and similarly on the other machines. |
22 |
Of course, ssh or anything else can be used to do this without |
23 |
physically accessing the machines. |
24 |
|
25 |
Then, on one machine (not necessarily that of the server), |
26 |
you run an appropriate "driver" script. |
27 |
|
28 |
> - time based start of a schedule |
29 |
> - dependencies in said schedules and between schedules which can delay |
30 |
> the actual start |
31 |
> - stop of schedule if error occurs |
32 |
|
33 |
All this is not a problem, since the "driver" script is just a |
34 |
shell script which calls "schedule" to start the tasks, |
35 |
wait for them being finished and/or checking their exit status. |
36 |
This is perhaps inconvenient but has the advantage of being |
37 |
absolutely flexible: |
38 |
You can use all linux tools like "sleep" (or also use at or cron) |
39 |
to get any delays you want, do tests more powerful than checking |
40 |
the exit status etc. |
41 |
|
42 |
> - ability to restart schedule from crashed point |
43 |
|
44 |
Running non-yet started jobs after a crash is not a problem - |
45 |
you just edit your "driver" script appropriately and restart it. |
46 |
Jobs which were already running need to be re-queued if they |
47 |
should be running again. |