Re: Timed Execution of a Script (second time lucky?)
sez [EMAIL PROTECTED]: >I'm playing with Revolution as a CGI engine with the scripts in stacks. > > I'm wondering if there's a way to have Revolution executive a script >at specified intervals, for example, every Tuesday night at ten >o'clock. > >Any thoughts? Sure. The basic idea is pretty simple: on openStack # or whatever other trigger you like ... send ("TimedScript" && 86400) to me in 3600 seconds ... end openStack on TimedScript TheInterval DoAllKindsaStuffHere send ("TimedScript" && TheInterval) to me in TheInterval seconds end TimedScript Of course, this kinda assumes that your machine will NEVER crash or go offline. Not what you'd call a realistic assumption. Therefore, a better idea would be to figure out when you want "TimedScript" to run the first time, and how often it should run thereafter (you're likely to find the dateItems time/date format helpful here); write that information to a text file on disc; and every time the program is run, it reads that text file & uses that information. In short: The key is "send TheMessage to me in XXX seconds". The rest -- figuring out what value to use for XXX -- is up to you. Hope this helps... ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Timed Execution of a Script (second time lucky?)
Thank you so much, Derek, Frank, Jacqueline, Klaus, and Robert. Excellent advice. Greg ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Timed Execution of a Script (second time lucky?)
Hi Jaqueline, On 3/18/05 7:56 AM, Gregory Lypny wrote: I'm playing with Revolution as a CGI engine with the scripts in stacks. I'm wondering if there's a way to have Revolution executive a script at specified intervals, for example, every Tuesday night at ten o'clock. Rev CGIs start up and run when they are called, then execute, and then shut down. They don't stay running in between requests, so there would be no way for the CGI to check the time unless it happened to be running already for some other reason. I have a couple of CGIs that do things on a timed basis, and the way to implement this is to set up a cron job HA, CRON job! Thank you very much :-) on the server that calls the CGI periodically. In your case, you would only need to set the cron job to execute once a week on Thursdays at 10 PM. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com Regards Klaus Major [EMAIL PROTECTED] http://www.major-k.de ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Timed Execution of a Script (second time lucky?)
On 3/18/05 7:56 AM, Gregory Lypny wrote: I'm playing with Revolution as a CGI engine with the scripts in stacks. I'm wondering if there's a way to have Revolution executive a script at specified intervals, for example, every Tuesday night at ten o'clock. Rev CGIs start up and run when they are called, then execute, and then shut down. They don't stay running in between requests, so there would be no way for the CGI to check the time unless it happened to be running already for some other reason. I have a couple of CGIs that do things on a timed basis, and the way to implement this is to set up a cron job on the server that calls the CGI periodically. In your case, you would only need to set the cron job to execute once a week on Thursdays at 10 PM. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Timed Execution of a Script (second time lucky?)
Hi Frank, -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You'd run the program constantly in the background; you could start it using su through an rc script on a UNIX box, for example. ah, i see, i thought the engine would be loaded everytime when needed on *nix... Best Klaus Major [EMAIL PROTECTED] http://www.major-k.de ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Timed Execution of a Script (second time lucky?)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You'd run the program constantly in the background; you could start it using su through an rc script on a UNIX box, for example. On Mar 18, 2005, at 10:24 AM, Klaus Major wrote: Hi Frank, Am 18.03.2005 um 15:40 schrieb Frank D. Engel, Jr.: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 on preOpenStack checkTime end preOpenStack on checkTime if (the long date contains "Thursday") and (char 1 to 2 of the time is "10") and (the time contains "PM") then doYourStuff send "checkTime" to me in 60 sec end checkTime on doYourStuff -- stuff to be executed every thursday night at 10:00 end doYourStuff but who/what will trigger the trigger then? ;-) Can't this be done by a simple cronjob? He asked very naively, yet hoping to be rigth in the end :-D On Mar 18, 2005, at 8:56 AM, Gregory Lypny wrote: ... I'm playing with Revolution as a CGI engine with the scripts in stacks. I'm wondering if there's a way to have Revolution executive a script at specified intervals, for example, every Tuesday night at ten o'clock. Any thoughts? Greg Best from astoundingly sunny germany :-) Klaus Major [EMAIL PROTECTED] http://www.major-k.de ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution - --- Frank D. Engel, Jr. <[EMAIL PROTECTED]> $ ln -s /usr/share/kjvbible /usr/manual $ true | cat /usr/manual | grep "John 3:16" John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. $ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) iD8DBQFCOvvj7aqtWrR9cZoRAumIAJ4n31j6bZIysOx+cxAvC80+vKbQzwCgiu8j cT05dnXt6lyJEskLTKfqUZo= =Pkh3 -END PGP SIGNATURE- ___ $0 Web Hosting with up to 120MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Timed Execution of a Script (second time lucky?)
Hi Frank, Am 18.03.2005 um 15:40 schrieb Frank D. Engel, Jr.: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 on preOpenStack checkTime end preOpenStack on checkTime if (the long date contains "Thursday") and (char 1 to 2 of the time is "10") and (the time contains "PM") then doYourStuff send "checkTime" to me in 60 sec end checkTime on doYourStuff -- stuff to be executed every thursday night at 10:00 end doYourStuff but who/what will trigger the trigger then? ;-) Can't this be done by a simple cronjob? He asked very naively, yet hoping to be rigth in the end :-D On Mar 18, 2005, at 8:56 AM, Gregory Lypny wrote: ... I'm playing with Revolution as a CGI engine with the scripts in stacks. I'm wondering if there's a way to have Revolution executive a script at specified intervals, for example, every Tuesday night at ten o'clock. Any thoughts? Greg Best from astoundingly sunny germany :-) Klaus Major [EMAIL PROTECTED] http://www.major-k.de ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Timed Execution of a Script (second time lucky?)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 on preOpenStack checkTime end preOpenStack on checkTime if (the long date contains "Thursday") and (char 1 to 2 of the time is "10") and (the time contains "PM") then doYourStuff send "checkTime" to me in 60 sec end checkTime on doYourStuff -- stuff to be executed every thursday night at 10:00 end doYourStuff On Mar 18, 2005, at 8:56 AM, Gregory Lypny wrote: Hello everyone, I posted this one a few days ago but didn't get a response, so I'm taking another kick at the cat. Any comment is welcome, even a few lines from your favourite Beatles' song. ;) I'm playing with Revolution as a CGI engine with the scripts in stacks. I'm wondering if there's a way to have Revolution executive a script at specified intervals, for example, every Tuesday night at ten o'clock. Any thoughts? Greg ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution - --- Frank D. Engel, Jr. <[EMAIL PROTECTED]> $ ln -s /usr/share/kjvbible /usr/manual $ true | cat /usr/manual | grep "John 3:16" John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. $ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) iD8DBQFCOuhb7aqtWrR9cZoRAu/sAJ9+REzsEBhSUISJ/iQ6peha4yntbgCgiIGd 4527UT0bd2hmsqJnki8XZI0= =KNWS -END PGP SIGNATURE- ___ $0 Web Hosting with up to 120MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Timed Execution of a Script (second time lucky?)
Greg, This could easily be achieved by creating a Daemon with Revolution. A Daemon is nothing more than a program that just sits there, and as you would want, would execute a script according to a timed interval. Since you are using Rev for CGI, it would have to be a program that is loaded when your server starts up, or remotely from a client computer which can make the calls to the CGI script that you want to execute. I hope this helps! Derek Bump Dreamscape Software ___ Compress Images Easily with JPEGCompress 2.5 http://www.dreamscapesoftware.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Timed Execution of a Script (second time lucky?)
Hello everyone, I posted this one a few days ago but didn't get a response, so I'm taking another kick at the cat. Any comment is welcome, even a few lines from your favourite Beatles' song. ;) I'm playing with Revolution as a CGI engine with the scripts in stacks. I'm wondering if there's a way to have Revolution executive a script at specified intervals, for example, every Tuesday night at ten o'clock. Any thoughts? Greg ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution