October 26th, 2000, 06:34 AM
I'd like to know how to send an external process to the background, so that I can run multiple instances of the same process at one time. Any tips, links.. etc??
October 26th, 2000, 03:36 PM
Well if you're running it from the command prompt you can do it like this:
perl /path/to/file.pl &
the '&' will run it as a background process.
To make the script figure out stuff and run the background take more work.
October 27th, 2000, 09:30 PM
You may need to check time of day within your code.
($second,$minute,$hour,$day,$month,$year,$week,$isdst) = localtime(time);
if ($hour eq 9)
do something ...
Then of course, run your program like the following:
perl youfile.pl &
[This message has been edited by Helicon (edited October 27, 2000).]
November 12th, 2000, 10:21 AM
Can I just clarify, does background processing mean I could set a script off via Telnet using the above method and log out with the script continuing to run 24/7?
Also, what does "sleep(3600);" mean?
Sorry for the intrusion into the thread, but I think you just solved a few major headaches for me!