schedule filename(arguments)
Add a schedule to the list of pending schedules.
Script filename(arguments)
observe.sch
from the home directory of a user called mcs
to the
queue of schedules waiting to be run. If the script is ok, and
no other schedules are waiting to run, then it will be run
immediately. This script doesn't expect any arguments, so
the parentheses that normally enclose the argument list have
been omitted.
schedule ~mcs/observe.sch
(String s, Boolean b) ...statements...Thereafter
s
and b
behave like global
variables with constant values.
The corresponding script, say ~mcs/test.sch
would
then be scheduled by typing:
schedule ~mcs/test.sch("hello", true)If one were to call the script without any arguments, an error message would be emitted.
An interesting use of schedule arguments is to pass the name(s)
of files to import
statements. This allows one to create a template schedules which
operate on lists of values provided by imported files. An example
of this is given in the documentation of the Script
command, where a list of
stars to be observed is passed to the script by way of a file
that the script imports. The imported file declares and defines a
list variable of sources, giving it the name expected by the foreach
statement that follows
the import statement.
abort_schedule
command,
the next schedule on the queue is started.