start script automatically

T

Tom

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
 
E

Egor Bolonev

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: (e-mail address removed) [ru eo en]
 
B

Ben Finney

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top