Document job names.
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 23 Feb 2012 14:58:03 +0000 (14:58 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 23 Feb 2012 14:58:03 +0000 (14:58 +0000)
tools/whenjobs.pod

index ad60c0d..2acec9f 100644 (file)
@@ -498,6 +498,21 @@ well-known directory, eg. C<$HOME>, C</var> etc.
 The shell script runs as the ordinary user.  It has no special
 privileges.
 
+=head2 JOB NAMES
+
+Jobs are given implicit names (C<job$1>, C<job$2> etc.).  You can also
+name jobs explicitly by preceeding the "every" or "when" statement
+with C<job "name">:
+
+ job "poll source"
+ every 10 seconds :
+ <<
+   # ...
+ >>
+
+The job name is passed to the shell script in the C<$JOBNAME>
+environment variable.
+