Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > start script automatically

Reply
Thread Tools

start script automatically

 
 
Tom
Guest
Posts: n/a
 
      07-08-2003
Hi,

I have a problem because I don't know how to start my script
automatically after a special event happens.

In detail: I store data from a PLC. Every 30 seconds the data is stored
in a new file. After the file is stored I would like to start my script
that analyzes the data right away. Any help how to do this is deeply
appreciated.

Thank you very much in advance.
Regards, Tom

 
Reply With Quote
 
 
 
 
Egor Bolonev
Guest
Posts: n/a
 
      07-08-2003
Hello, Tom!
You wrote on Tue, 08 Jul 2003 11:17:37 +0200:

T> Hi,

T> I have a problem because I don't know how to start my script
T> automatically after a special event happens.

T> In detail: I store data from a PLC. Every 30 seconds the data is stored
T> in a new file. After the file is stored I would like to start my script
T> that analyzes the data right away. Any help how to do this is deeply
T> appreciated.

T> Thank you very much in advance.
T> Regards, Tom

Your script have to work like a demon or the 'storer' have to run your
script.

With best regards, Egor Bolonev. E-mail: http://www.velocityreviews.com/forums/(E-Mail Removed) [ru eo en]

 
Reply With Quote
 
 
 
 
Ben Finney
Guest
Posts: n/a
 
      07-08-2003
On Tue, 08 Jul 2003 11:17:37 +0200, Tom wrote:
> I have a problem because I don't know how to start my script
> automatically after a special event happens.


You have two options:

- Have the process causing the event, also cause the script to run.
It's in the best position to know when the script should be run,
after all, since it created the event.

- Have a separate process watching for the event, which can then run
the script reactively. This can either be a scheduled event, if the
frequency is low (every few minutes or longer), or a
continuously-running process (also known as a daemon on Unix).

Which you prefer is dependent on how much you consider the two stages to
be linked together. If they are conceptually part of the same "event",
then the first option is preferable. If the two steps are conceptually
separate, keeping the processes separate may be preferable since you are
not then committed to running them always in sequence.

--
\ "Too many Indians spoil the golden egg." -- Sir Joh |
`\ Bjelke-Petersen |
_o__) |
http://bignose.squidly.org/ 9CFE12B0 791A4267 887F520C B7AC2E51 BD41714B
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wireless zero config service wont start automatically =?Utf-8?B?VmFs?= Wireless Networking 1 02-06-2006 09:38 PM
Wireless Zero Configuration - does not start automatically (sort o =?Utf-8?B?TWF0dGhldyBFbGxpcyAoU0Q0Nyk=?= Wireless Networking 0 09-12-2005 05:01 PM
schedule to start web server automatically Zeng ASP .Net 1 04-20-2005 12:06 AM
Automatically Start VPN Client When Computer Starts Jim Faust Cisco 2 07-18-2004 07:18 PM
Spybot activating automatically on start up! Phil Computer Support 15 01-19-2004 04:13 PM



Advertisments