Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Check if a process is running on Windows

by mhi (Friar)
on Jun 14, 2004 at 09:01 UTC ( #366447=note: print w/replies, xml ) Need Help??

in reply to Check if a process is running on Windows

Granted, this is not particularly a perl answer... :-)

You may be happier installing cygwin on that box to have a Unix-like environment in which to run your scripts. With a simple ps -efW you'll see not only the cygwin processes, but also the Windows ones. You might also want to run your checker (and perhaps the original tail-and-mail script) from cygwin's cron utility.

Also, a common way to check whether something is still running (actually running and not stuck somewhere) is to have it do something external (like touch a certain file or write into a log - a generalization of what bibo mentioned above) every once in a while and checking periodically whether this action has been executed recently enough. That may be better than simply checking for the existence of a process.

Have fun!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://366447]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-08-17 20:34 GMT
Find Nodes?
    Voting Booth?

    No recent polls found