LSModule:Scheduler:Scheduler (Command)

From Lavish Software Wiki
Jump to navigation Jump to search


Command Difficulty Rating
Usage Advanced
Level of Understanding Intermediate
Computer Savvy Intermediate
Logic Intermediate

Scheduler -list|-clear|-remove <name>|-add <name> <command> [in <interval>|at


Lists, clears, removes or adds scheduled events. Scheduling is accurate to seconds, not to milliseconds like other methods (such as TimedCommand).

Time Intervals

Scheduler supports a few styles of time intervals.

Form 1: Clock-style

Clock-style intervals are given in the form years:days:hours:minutes:seconds, and can be shortened all the way down to minutes:seconds. There is no limit to the number in each unit; the numbers will simply be added as read.

  • 0:01 is one second
  • 1:00 is one minute
  • 1:00:00 is one hour
  • 1:00:00:00 is one day (24 hours)
  • 1:00:00:00:00 is one year (365 days)
  • 0:750 is 750 seconds
  • 150:750 is 150 minutes and 750 seconds
  • 78:00:00 is 78 hours

Form 2: Word Form

Word form intervals can be given in a variety of ways. Any words are considered to be part of the units, and numbers are considered to be, well, the number. If no number is given for the first unit, the number is assumed to be 1 (this allows things like "every second" to automatically work as "every 1 second"). Valid units are years, days, hours, minutes and seconds, as well as their singular forms. Each can be shortened to a single letter if desired: y,d,h,m,s. A unit is considered to be completed when a non-alpha character is found, and the number is immediately applied (this means "1m20s" is the same as "1 minute, 20 seconds"). Any unknown unit will be ignored. There is no limit to the number in each unit; the numbers will simply be added as read. The units do NOT need to appear in any particular order (this means that "20s1m" and "20 seconds, 1 minute" are also valid, they just look funny), and CAN appear multiple times (so "1m20s20s20s" is also valid).

  • second
  • day
  • 1 second
  • 12 minutes
  • 5 days
  • 2 years
  • 750 seconds
  • 150 minutes, 750 seconds
  • 12 minutes 59 seconds
  • 12 years 3 days 15 hours 12 minutes 1 seconds


  • Scheduler -list
  • Scheduler -clear
  • Scheduler -remove "my event"
  • Scheduler -add pizza "MessageBox Pizza is ready!" in 20 minutes
Note: MessgeBox is not a built-in LavishScript command. It is available in Inner Space Sessions.
  • Scheduler -add spam "echo This echoes every second, starting from one second from now!" every second
Note: Echo is not a built-in LavishScript command either. It is generally available in LavishScript-enabled applications that provide consoles.
  • Scheduler -add spam "echo This echoes every second, starting from ten seconds from now!" in 10 seconds every second

See Also