Hello monks,
I have a bunch of polished Perl scripts and Win32 batch files I use for regular sysadmin tasks. I launch these manually from a command prompt, and they handle things like simple backups, file locating, log printouts. These scripts require no user intervention whatsoever, although some take a few parameters. They generally log output to a file, or e-mail me results.
I'd like to write a launcher for these scripts. What I have in mind is a script that loops eternally on my workstation, waiting for trigger from me or someone else. The trigger might be the appearance of a certain file, or maybe a signal from another process. When a trigger is pulled, the launcher will run the appropriate script, and immediately continue waiting for new triggers.
Conceptually, I'm stuck on the best way to actually launch the scripts. I've looked at
fork,
open,
system,
exec, backticks, and a few modules, but they either don't do quite what I need, or they are far too complex for my purposes. I just need to launch a script (or batch or exe) and continue. I don't need to capture output; I don't want to wait for the script to finish execution; I don't care about the success or failure of the process; I don't need any communication with the process after it launches.
What's a simple way of accomplishing this? Thanks!