start script automatically

Discussion in 'Python' started by Tom, Jul 8, 2003.

  1. Tom

    Tom Guest

    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
    Tom, Jul 8, 2003
    #1
    1. Advertising

  2. Tom

    Egor Bolonev Guest

    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: [ru eo en]
    Egor Bolonev, Jul 8, 2003
    #2
    1. Advertising

  3. Tom

    Ben Finney Guest

    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
    Ben Finney, Jul 9, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zeng
    Replies:
    1
    Views:
    378
    Lucas Tam
    Apr 20, 2005
  2. Lucas Tam
    Replies:
    0
    Views:
    487
    Lucas Tam
    Jun 17, 2005
  3. mickeyb

    Automatically start WCF

    mickeyb, Nov 16, 2008, in forum: .NET
    Replies:
    0
    Views:
    492
    mickeyb
    Nov 16, 2008
  4. Svante

    How to automatically start an ASP.NET Web Service

    Svante, Sep 29, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    105
    Svante
    Sep 29, 2005
  5. Jean
    Replies:
    3
    Views:
    84
    Charlton Wilbur
    Jan 17, 2004
Loading...

Share This Page