Index

Script

The pathname and arguments of a scheduling script.

Input Format:

An absolute path name, optionally followed by an argument list enclosed between parentheses.

Examples:
The following example adds a script file to the end of the queue of schedules waiting to be executed. In this case the file resides in a subdirectory of the home directory of a user called cbi. Note that in this example the script doesn't take any arguments, so the parentheses that normally enclose the argument list can be omitted.
 schedule ~cbi/sched/rotate.sch
The following is an example of passing arguments to a script. In this case two arguments are passed, the name of a file that contains a list of stars, and an interval over which to observe each star.
 schedule ~cbi/sched/stars.sch(midnight_stars, 5m)
The contents of this script could be as shown below, with the optional first line declaring the mandatory arguments, star_list and dt that the script expects.
 (InputFile star_list, Interval dt)
 import $star_list
 foreach(Source src) $stars {
   track $src
   until $elapsed > $dt | Elevation($src) < 40
 }
The contents of the imported file, midnight_stars would then define the list of stars that the above foreach statement uses, as follows:
 listof Source stars = {vega, lyra, alpaql, alpcyg}

Martin Shepherd (31-Oct-1999)