What is the best way to trigger an action at a certain time?
    Ben Rubinstein 
    benr_mc at cogapp.com
       
    Tue Jul 12 10:48:04 EDT 2022
    
    
  
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