/* end of SCHEDULE_IT *********************************************************/
/* show time-table, sleep & execute passed command */
SHOW_SLEEP_EXECUTE: PROCEDURE EXPOSE atrgf.
/* define some colors to demonstrate them */
esc = '1B'x /* define ESCape character */
red = esc||"[31m" /* ANSI.SYS-control for red foreground */
yellow = esc||"[33m" /* ANSI.SYS-control for yellow foreground */
cyan = esc||"[36m" /* ANSI.SYS-control for cyan foreground */
normal = esc||"[0m" /* ANSI.SYS-control for resetting attributes to normal */
SAY
SAY " started:" cyan||RIGHT(DATERGF(atrgf.start.dat, "DN")||',',12) DATE2STR(atrgf.start.dat, atrgf.format_date) atrgf.start.tim normal
IF atrgf.start.dat <> atrgf.last.dat | atrgf.start.tim <> atrgf.last.tim THEN
DO
SAY
SAY " last execution:" yellow||RIGHT(DATERGF(atrgf.last.dat, "DN")||',',12) DATE2STR(atrgf.last.dat, atrgf.format_date) SUBSTR(atrgf.last.tim,1,5) normal