Asked — Edited
Resolved Resolved by DJ Sures!

Executing Functions At A Specific Time Interaval

I am trying to write a script that does a specific function at 15 minutes, 30 minutes, and 1 hour. I cant figure out how to write it so if 15 minutes it resets that time, and continues to count until 30 minutes, and then an hour. Does anyone have an example of such a script.

Thanks.


ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

Author Avatar
PRO
Synthiam
#1  

$loopCount = 0

:loop

$loopCount++

sleep(1000 * 60 * 15)

IF ($loopCount = 1)

  say("15 minutes has expired")

ELSEIF ($loopCount = 2)

  say("30 minutes has expired")

ELSEIF ($loopCount = 3)

  say("45 minutes has expired")

ELSEIF ($loopCount = 4)

  say("60 minutes has expired")

  $loopCount = 0

ENDIF

goto(loop)
Author Avatar
PRO
USA
#2  

Very cool! Thanks.