Pushover icon Pushover Send robot status alerts to iOS, Android and Windows via Pushover.net. Configure User/App keys to notify on low battery, stuck or task events. Try it →
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

Your robot can be more than a simple automated machine with the power of ARC Pro!

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#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.