Document job names.
[whenjobs.git] / 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.
 
 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.
+