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