Minor rearrangements to whenjobs(1) manpage.
[whenjobs.git] / tools / whenjobs.pod
index 5750646..14ca141 100644 (file)
@@ -79,12 +79,41 @@ Variables are stored (per-user) in the daemon.  You can use the
 command line tool to examine and set variables:
 
  $ whenjobs --variables
- load=0.9
+ JOBSERIAL=297
+ libguestfs_build_local=1.17.16
+ libguestfs_commit=7e32d892d76a31f55e2a4151902623b9949e3efa
+ libguestfs_dist=1.17.16
+ libguestfs_release=1.17.16
+ libguestfs_stable_build_local=1.16.10
+ libguestfs_stable_commit=27433a0a335301441b1eb6244ba425c2c44b2d99
+ libguestfs_stable_dist=1.16.10
+ libguestfs_stable_release=1.16.10
+ libguestfs_stable_version=1.16.10
+ libguestfs_version=1.17.16
  $ whenjobs --set cat=sushi
  $ whenjobs --get cat
  sushi
 
-The act of setting a variable (using I<--set>) can trigger jobs to run.
+Note: The act of setting a variable (using I<--set>) can trigger jobs
+to run.
+
+You can also list out what jobs are running:
+
+ $ whenjobs --jobs
+ 287 libguestfs-stable: fedora 16
+    running in: /tmp/whenjobsa2afc44fd757465f95438309f1a51609
+    started at: 2012-03-13 10:59:37
+
+and you can 'tail' the output of running jobs which is useful for
+debugging:
+
+ $ whenjobs --tail 287
+ Uploading: 147496271972717053d46b82a07435ca  libguestfs-1.16.10.tar.gz
+
+You can start and cancel jobs manually:
+
+ $ whenjobs --start 'libguestfs: poll'
+ $ whenjobs --cancel 287
 
 =head1 OPTIONS
 
@@ -127,6 +156,17 @@ C<vi> is used.
 
 Print the value of a variable.
 
+=item B<-help>
+
+=item B<--help>
+
+Display brief usage and exit.
+
+=item B<--job-names>
+
+List the names of all loaded jobs (whether they are running or not).
+Use I<--jobs> to list running jobs.
+
 =item B<--jobs>
 
 List all running jobs.
@@ -181,7 +221,9 @@ operation.
 When using I<--type> and multiple variables, the type changes the
 remaining command line parameters until the next I<--type>, eg:
 
- whenjobs --set cat=sushi --type float weight=3.5 --type string food=fish
+ whenjobs --set cat=sushi \
+     --type float weight=3.5 \
+     --type string food=fish
 
 (C<cat> and C<food> are strings, and C<weight> is a float).
 
@@ -197,6 +239,17 @@ may cause unexpected results, so use with caution.
 Tail the output of the running job identified by its serial number.
 Use the I<--jobs> flag to get a list of running jobs.
 
+=item B<--test> variable=value [variable=value ...]
+
+This works the same way as the I<--set> option, but the difference is
+that the variables are not set.  Instead, it lists out the jobs that
+I<would> run, I<if> the variables were updated to these new values.
+
+The variables are not actually updated, and the jobs are not actually
+run.
+
+The output is a list of job names that would run.
+
 =item B<--upload>
 
 Compile the jobs script and upload it to the daemon, without editing.
@@ -214,12 +267,6 @@ Display all the variables and their values, in the format C<name=value>.
 
 Display the name and version of the program and exit.
 
-=item B<-help>
-
-=item B<--help>
-
-Display brief usage and exit.
-
 =back
 
 =head1 REFERENCE