start script automatically

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom

    start script automatically

    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

  • Egor Bolonev

    #2
    Re: start script automatically

    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: [email protected] [ru eo en]

    Comment

    • Ben Finney

      #3
      Re: start script automatically

      On Tue, 08 Jul 2003 11:17:37 +0200, Tom wrote:[color=blue]
      > I have a problem because I don't know how to start my script
      > automatically after a special event happens.[/color]

      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

      Comment

      Working...