NEW SCHEDULE @name (2:2){ FROM @calendar | TO @calendar } NEW SCHEDULE @name INTERVALS (4:4){ FROM @calendar | TO @calendar | DURATION @number(0:) | EVERY @number(0:) }
If you do not use the INTERVALS version of the command, the NEW SCHEDULE
command creates a schedule containing a single interval. The bounds of the
interval will be those specfied in the FROM and TO clauses.
If the INTERVALS version of the command is used, the first interval of the schedule will begin at the epoch specified with the FROM clause and will be of the duration specified in the DURATION clause of the command. The next interval will begin at the epoch determined by adding the quantity specified in the EVERY clause to the beginning of the previously created interval. The duration of the new interval will be the same as the previous interval. This construction is repeated until some portion of the new interval exceeds the epoch specified in the FROM clause. This final interval will be truncated (or dropped) as needed so that no portion of it will contain an epoch greater than the epoch of the TO clause.
If the specified schedule already exists, it is overwritten. No default annotation is attached to the schedule by the NEW SCHEDULE command.
Note that you may also use the word `NEW!' as a synonym for `NEW' in the NEW SCHEDULE command.
\Subsection Example 1
Schedules created with the NEW SCHEDULE command can be used to limit searches conducted by FIND commands to particular intervals without changing the bounds of the default interval. For example, the commands
CREATE NEXT_WEEK FROM 21 JUN 1991 TO 27 JUN 1991; FIND OCC OCCULTATION OF IO BY JUPITER FROM EARTH WITHIN NEXT_WEEK STEP SIZE 30 MINUTES; . . FIND schedule OCC OCCULTATION OF CALLISTO BY JUPITER FROM EARTH WITHIN NEXT_WEEK STEP SIZE 30 MINUTES;;are equivalent to the commands
SET BOUNDS FROM 21 JUN 1991 TO 27 JUN 1991; FIND OCC OCCULTATION OF IO BY JUPITER FROM EARTH STEP SIZE 30 MINUTES; . . FIND OCC OCCULTATION OF CALLISTO BY JUPITER FROM EARTH STEP SIZE 30 MINUTES;but do not change the bounds of the default interval, and therefore do not interfere with other procedures that depend on those bounds.
Schedules created with the NEW SCHEDULE command can be used in conjunction
with the INTERSECT command to limit the extent of other schedules, as shown
below.
NEW SCHEDULE NEXT_WEEK FROM 21 JUN 1991 TO 27 JUN 1991; IMPORT ALL_VISIBLE.WIN AS GLL_VISIBLE; LET GLL_VISIBLE = NEXT_WEEK * GLL_VISIBLE;
Suppose you know that due to a routine maintenance schedule you will not have
access to a communications link during a two hour period every Sunday
morning. You can use the NEW SCHEDULE command to create schedule of the
``down time'' and thus avoid scheduling any activity during that time.
NEW SCHEDULE DOWNTIME INTERVALS DURATION 2 HOURS FROM OCT 11, 1998 1:00:00 A.M. TO JAN 1, 2001 00:00:00 EVERY 1 WEEK; NEW SCHEDULE WORKSPAN FROM OCT 11, 1998 TO JAN 1, 2001 ; LET UPTIME = WORKSPAN - DOWNTIME;
The default interval may be changed at any time with the SET BOUNDS command.
The program creates the initial default schedule by executing the follo
SET BOUNDS USING 3 399 10;You can make a copy of the default schedule using the copy command
LET MYCOPY = $DEFAULT;