RepeatCommandDoc.tioga
Copyright © 1986 by Xerox Corporation. All rights reserved.
Carl Hauser, May 7, 1986 5:23:34 pm PDT
RepeatCommand
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
RepeatCommand
Postponing and Iterating Command Tool Commands
Carl Hauser
© Copyright 1986 Xerox Corporation. All rights reserved.
Abstract: A Cedar interface and command for executing other commands on a schedule comprising a start time, a period, and a number of iterations.
Created by: Carl Hauser
Maintained by: Carl Hauser <CHauser.pa>
Keywords: Command, delay, postpone, iterate
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
RepeatCommand
RepeatCommand is a program for executing other Cedar commands at some time in the future. The execution may be iterated, if desired. An upper limit can be placed on the number of iterations, and the iteration period can be controlled.
The implementation provides access from other Cedar programs through the RepeatCommand interface, which provides the single procedure
Repeat: PUBLIC PROC [cmd: Rope.ROPE, period: INT ← Days, start: BasicTime.GMT ← Immediately, nTimes: INT ← Forever];
It also registers a single CommandTool command with the syntax
repeat "Command line to be performed" [period ["Start time interpretable by Tempus" [nTimes]]]
 period defaults to 24*60*60 (one day)
 startTime defaults to BasicTime.Now[]
  nTimes defaults to LAST[INT]
Note the quoting of the command line and the start time, since in general, they will consist of more than a single token.