Document job names.
[whenjobs.git] / tools / whenjobs.pod
index 5a9ac72..2acec9f 100644 (file)
@@ -357,6 +357,10 @@ result is subtraction, multiplication, division or modulo.
 Other types give an error.  Note that I<mod> really is an infix
 operator.
 
 Other types give an error.  Note that I<mod> really is an infix
 operator.
 
+=item B<len> I<expr>
+
+If I<expr> is a string, this returns the length of the string.
+
 =item I<variable>
 
 The value of the named variable.
 =item I<variable>
 
 The value of the named variable.
@@ -494,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.
+