Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Multiple commands with one system call

by TomDLux (Vicar)
on Sep 29, 2011 at 16:07 UTC ( #928607=note: print w/replies, xml ) Need Help??


in reply to Re^2: Multiple commands with one system call
in thread Multiple commands with one system call

It's worth considering whether you need this degree of control, or whether it would be enough to do something simpler...say, run a job once an hour automatically.

If you need this degree of control and interactivity, I would have a wrapper script which launches your program, storing the process id (PID ) of the process. Then at regular intervals it can verify the process is still running, using ps. When the process stops, the wrapper can send a message.

A simple way to indicate the status is to create an indicator file, and delete it at the end. You can 'touch' the file at intervals to demonstrate the process is running and not crashed. Alternate, using the open with a pipe strategy, you can send text messages at intervals, 'still running', 'crashed' or 'completed'.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

  • Comment on Re^3: Multiple commands with one system call

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928607]
help
Chatterbox?
[zentara]: TGIF, I'm blowing my mind watching Casimir Effect & Black Holes - Sixty Symbols I love 60 Symbols. :-)
zentara ..oO the vacuum is teeming with photons and micro-blackholes

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-06-23 16:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (552 votes). Check out past polls.