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

Bob Sneidar bobsneidar at iotecdigital.com
Tue Jul 12 10:56:03 EDT 2022


It seems to me that if you have an open socket to listen for commands, you could have the chron or windows scheduler send those commands to your LC app. 

Ben, some syntax would be helpful. 

Bob S


> On Jul 12, 2022, at 07:48 , Ben Rubinstein via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi Tim,
> 
> On 11/07/2022 12:35, Tim Selander via use-livecode wrote:
>> 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.
> 
> My $0.02, FWIW: it this is really all your app is doing, and the times are every fee hours or days, rather than every few seconds, I would use the computer's built in scheduler to invoke your app, rather than have it running continuously and watching the time.
> 
> I have a number of things like this - LC apps which are launched by schedule. On Windows, the Windows scheduler (I generally use a batch script which launches the app in this case); on Mac or Linux, use cron. I find this more reliable, easier to update etc.
> 
> Ben




More information about the use-livecode mailing list