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

2022-07-13 Thread Tim Selander via use-livecode
Gentlemen, The trigger will be 'pulled' once or twice a day only -- so these external to LC options are also viable. Hadn't entered my head at all! Will be playing around with all these ideas and learn something! Basically use Macs, but have couple unused Windows laptops -- sounds like

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

2022-07-13 Thread Ben Rubinstein via use-livecode
Whatever works for your situation! At least one of my jobs, which runs a few times a week (pulling data from an internal system, generating and emailing a PDF report) has to launch fresh each time because of a bug in the graph widget which displays wrong if the script runs twice! There are

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

2022-07-12 Thread Bob Sneidar via use-livecode
Hmmm. Ok, but it seems having the LC app running invisibly all the time, listening for a command, something the cron service could do through the terminal easily enough, you could make it much more efficient. Just methods and madness I suppose. Bob S > On Jul 12, 2022, at 13:15 , Ben

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

2022-07-12 Thread Ben Rubinstein via use-livecode
I think I may not have been very clear. This isn't LiveCode doing anything special; just a standalone LiveCode app that either does something immediately on launch (and then quits), or inspects the command line parameters to decide what to do (and then quits). I usually create a .bat file

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

2022-07-12 Thread Bob Sneidar via use-livecode
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 > wrote: > > Hi Tim, > > On

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

2022-07-12 Thread Ben Rubinstein via use-livecode
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

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

2022-07-12 Thread Mike Kerner via use-livecode
I would suggest sending the "checkTime" message at the top of the handler in case something happens in --your code On Mon, Jul 11, 2022 at 11:28 AM Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > Slight improvement: > > local lInterval > constant cInterval = 300 > > on

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

2022-07-11 Thread Bob Sneidar via use-livecode
Slight improvement: local lInterval constant cInterval = 300 on openStack put cInterval into lInterval checkTime end openStack on checkTime -- your code send checkTime to me in lInterval seconds end checkTime setProp interval, pInterval if pInterval is empty then ask

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

2022-07-11 Thread Mike Kerner via use-livecode
I've got a library for adding CRON functionality, if you want something more elaborate. https://github.com/macMikey/mikeys-cron-library On Mon, Jul 11, 2022 at 7:48 AM Tim Selander via use-livecode < use-livecode@lists.runrev.com> wrote: > Tore, > > Interesting! 'send in time' is a new one for

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

2022-07-11 Thread Tim Selander via use-livecode
Tore, Interesting! 'send in time' is a new one for me. Thanks! Tim On 2022.07.11 20:43, Tore Nilsen via use-livecode wrote: For this I would use a recursive approach with «send in time» something like this: on openStack checkTime end openStack on checkTime ## Do your routines

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

2022-07-11 Thread Tore Nilsen via use-livecode
For this I would use a recursive approach with «send in time» something like this: on openStack checkTime 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

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

2022-07-11 Thread Tim Selander via use-livecode
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