author | viric@mandarina |
Wed, 06 Feb 2008 22:51:58 +0100 | |
changeset 191 | 35b77fb4deb1 |
parent 185 | 5ec722128e27 |
child 201 | 144847554666 |
permissions | -rw-r--r-- |
140 | 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
2 |
<html lang="en"> |
|
3 |
<head> |
|
4 |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> |
|
5 |
<title>Task Spooler - batch is back!</title> |
|
6 |
</head> |
|
7 |
||
8 |
<body> |
|
9 |
<h1>Task Spooler</h1> |
|
10 |
||
11 |
<p>I wrote <em>Task Spooler</em> because I didn't have any comfortable way of |
|
12 |
running batch jobs in my linux computer. I wanted to:</p> |
|
13 |
<ul> |
|
14 |
<li>Queue jobs from different terminals. |
|
15 |
<li>Use it locally in my machine (not as in network queues). |
|
16 |
<li>Have a good way of seeing the output of the processes (tail, errorlevels, |
|
17 |
...). |
|
18 |
<li>Easy use: almost no configuration. |
|
19 |
<li>Easy to use in scripts. |
|
20 |
</ul> |
|
21 |
||
22 |
<p>You can look at an old (but representative) |
|
23 |
<a href="ts-0.2.1.png">screenshot</a> if you want.</p> |
|
24 |
||
25 |
<h2>Mailing list</h2> |
|
26 |
||
27 |
<p>Alessandro Öhler prepared a mailing list for discuting newer functionalities |
|
28 |
and interchanging use experiences. You can look at the |
|
29 |
<a href="http://mail.linuxbox.eu.org/taskspooler/">archive</a> or |
|
30 |
<a href="mailto:taskspooler+subscribe@linuxbox.eu.org">subscribe</a>. |
|
31 |
</p> |
|
32 |
||
33 |
<h2>How it works</h2> |
|
34 |
||
35 |
<p>The queue is maintained by a server process. This server process is started |
|
36 |
if it isn't there already. The communication goes to a unix socket in |
|
37 |
<kbd>/tmp/</kbd>.</p> |
|
38 |
<p>When the user requests a job (using a ts client), the client waits for the |
|
39 |
server message to know when it can start. The client usually forks, but |
|
40 |
it will run the command with the proper environment, because |
|
41 |
<em>the client</em> will |
|
42 |
run the job (not the server, like in 'at' or 'cron'). So, the ulimits, |
|
43 |
environment, pwd,. apply.</p> |
|
44 |
<p>When the job finishes, the client notifies the server. At this time, |
|
45 |
the server may notify any <em>waiting</em> client, and stores the |
|
46 |
output and the errorlevel of the finished job.</p> |
|
47 |
||
48 |
<h2>Download</h2> |
|
49 |
||
162 | 50 |
<p>Download the latest version (GPLv2+ licensed): |
191
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
51 |
<a href="ts-0.5.tar.gz">ts-0.5.tar.gz</a> - v0.5</p> |
140 | 52 |
|
53 |
<p>Look at the |
|
54 |
<a href="/~mercurial/cgi-bin/hgwebdir.cgi/ts">version repository</a> if you are |
|
55 |
interested in its development.</p> |
|
56 |
||
57 |
<p>Андрей Пантюхин (Andrew Pantyukhin) maintains the |
|
58 |
<a href="http://www.freshports.org/sysutils/ts">BSD port</a>.</p> |
|
59 |
||
60 |
<p>Alessandro Öhler provided a Gentoo |
|
185 | 61 |
<a href="ts-0.4.ebuild">ebuild for 0.4</a>, but with a simple rename it becames |
191
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
62 |
a valid <a href="ts-0.5.ebuild">ebuild for 0.5</a>.</p> |
162 | 63 |
|
191
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
64 |
<p>I try to maintain Debian packages: |
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
65 |
<a href="ts_0.5_i386.deb">ts_0.5_i386.deb</a>. (warning, it conflicts |
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
66 |
with the binary also named 'ts' in the package 'moreutils')</p> |
140 | 67 |
|
185 | 68 |
<p>Pascal Bleser packed the program for SuSE and openSuSE in <a |
69 |
href="http://packman.links2linux.de/package/ts/">RPMs for various |
|
70 |
platforms</a>.</p> |
|
71 |
||
140 | 72 |
<h2>Manual</h2> |
191
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
73 |
<p>Look at its <a href="man_ts.html">manpage</a> (v0.5). |
140 | 74 |
Here you also have a copy of the help for the same version:</p> |
75 |
<pre> |
|
162 | 76 |
usage: ./ts [action] [-ngfmd] [-L <lab>] [cmd...] |
140 | 77 |
Env vars: |
191
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
78 |
TS_SOCKET the path to the unix socket used by the ts command. |
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
79 |
TS_MAILTO where to mail the result (on -m). Local user by default. |
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
80 |
TS_MAXFINISHED maximum finished jobs in the queue. |
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
81 |
TS_ONFINISH binary called on job end (passes jobid, error, outfile, command). |
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
82 |
TS_ENV command called on enqueue. Its output determines the job information. |
35b77fb4deb1
Updating changelog to 0.5.1 - adding web index since 0.5
viric@mandarina
parents:
185
diff
changeset
|
83 |
TS_SAVELIST filename which will store the list, if the server dies. |
140 | 84 |
Actions: |
85 |
-K kill the task spooler server |
|
86 |
-C clear the list of finished jobs |
|
87 |
-l show the job list (default action) |
|
162 | 88 |
-t [id] tail -f the output of the job. Last run if not specified. |
89 |
-c [id] cat the output of the job. Last run if not specified. |
|
90 |
-p [id] show the pid of the job. Last run if not specified. |
|
140 | 91 |
-o [id] show the output file. Of last job run, if not specified. |
162 | 92 |
-i [id] show job information. Of last job run, if not specified. |
140 | 93 |
-s [id] show the job state. Of the last added, if not specified. |
94 |
-r [id] remove a job. The last added, if not specified. |
|
95 |
-w [id] wait for a job. The last added, if not specified. |
|
96 |
-u [id] put that job first. The last added, if not specified. |
|
97 |
-U <id-id> swap two jobs in the queue. |
|
98 |
-h show this help |
|
99 |
-V show the program version |
|
100 |
Options adding jobs: |
|
101 |
-n don't store the output of the command. |
|
102 |
-g gzip the stored output (if not -n). |
|
103 |
-f don't fork into background. |
|
104 |
-m send the output by e-mail (uses sendmail). |
|
162 | 105 |
-d the job will be run only if the job before ends well |
106 |
-L <lab> name this task with a label, to be distinguished on listing. |
|
140 | 107 |
</pre> |
108 |
||
109 |
<h2>Thanks</h2> |
|
110 |
<ul> |
|
111 |
<li>To Raúl Salinas, for his inspiring ideas |
|
112 |
<li>To Alessandro Öhler, the first non-acquaintance user, who proposed and |
|
113 |
created the mailing list. |
|
114 |
<li>Андрею Пантюхину, who created the <em>BSD port</em>. |
|
115 |
<li>To the useful, although sometimes uncomfortable, UNIX interface. |
|
116 |
<li>To GNU, an ugly but working and helpful ol' UNIX implementation. |
|
117 |
</ul> |
|
118 |
||
119 |
<address>Author: |
|
120 |
<a href="http://vicerveza.homeunix.net/~viric/">Lluís Batlle i Rossell</a>, |
|
121 |
viric_at_vicerveza_dot_homeunix_dot_net</address> |
|
122 |
</body> |