What is the best way to trigger an action at a certain time?

Tore Nilsen tore.nilsen at me.com
Mon Jul 11 07:43:45 EDT 2022

For this I would use a recursive approach with «send in time» something like this:

on openStack	
end openStack

on checkTime
  ## Do your routines of checking time, performing the required action etc.
  send checkTime to me in 300 seconds. ## you set the interval to whatever is best for you
end checkTime

Best regards
Tore Nilsen

> 11. jul. 2022 kl. 13:35 skrev Tim Selander via use-livecode <use-livecode at lists.runrev.com>:
> Dear all,
> I want to have an LC app running on a computer doing nothing but watching the time. At predetermined times, I then want it to run a command. A call to an API on a website.
> In the old HC days, I remember using "on idle" to watch for a set time. But even then, using "on idle" was less than ideal. CPU hog. What is the preferred/LC way to have an app trigger a command at a specific time of day?
> Any pointers appreciated!
> Tim Selander
> Tokyo, Japan
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

More information about the use-livecode mailing list