sleep until, sleep until countdown

Prev Next

Function Names

sleep until, sleep until countdown

Description

The program will sleep until a specific target date (and time) has been reached. 00:00:00 is assumed if no time is specified. This feature is useful to schedule tasks at fixed time intervals. Example: Scheduling database downloads every morning at 07:30, and the data is avaiable when you are in the office.

  • If the target date is a blank date, then pausing does not place place.
  • If the target date lies in the past, then pausing does not take place, too.
  • If a time without date is specified, then pausing takes place until the target time has been reached.
  • If a time without date is specified and the time is earlier than the current time, then pausing takes place until the time is reached in the following day.

The ... countdown suffix will output the remaining time in following manner:

Time to go Countdown output
More than 1 day Waiting for xx days ...
More than 1 hour Waiting for xx hours ...
More than 1 minute Waiting for xx minutes ...
Less than 1 minute Waiting for xx seconds, ... counting down to "Waiting for 0 seconds", "Waiting done".

Call as: procedure

Parameter count

1

Parameters

No.TypeDescription
1
input
date Target date / time

Sleeping takes place until specified date and time has been reached

2
input
string Prompt

Prompts a message that sleeping is in progress

Examples

      sleep countdown (3, "Waiting ");

Output

Software will display a down-counting number on the same row

See also

wait until
wait until countdown
sleep
sleep until