From: Richard W.M. Jones <rjones@redhat.com>
Date: Thu, 23 Feb 2012 14:58:03 +0000 (+0000)
Subject: Document job names.
X-Git-Tag: 0.0.3~7
X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=600c8000490fa8279b23ce866e9ecc2a90e5f79a;p=whenjobs.git

Document job names.
---

diff --git a/tools/whenjobs.pod b/tools/whenjobs.pod
index ad60c0d..2acec9f 100644
--- a/tools/whenjobs.pod
+++ b/tools/whenjobs.pod
@@ -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.
+