Script
The pathname and arguments of a scheduling script.
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.schThe 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}