![]() |
Any Shell Coders Out There?
Hey guys! I would like to write a shell script that opens sub shells to run multiple commands at one time. What i need the script to do is start for ex: 1.php then 2.php then 3.php . Can anyone help?
Thanks in Advance! |
explain a bit more...maybe i can help.
|
I have 5 php scripts that I would like to code a shell script to run all the php scripts at the same time. I am going to create a cronjob to run the shell script instead of creating a cronjob to individually run each php script.
|
Depending on your shell...
#!/bin/sh /path/to/php /path/to/1.php /path/to/php /path/to/2.php /path/to/php /path/to/3.php |
use run-parts and put them all in a directory, executable?
15 6 * * * run-parts /home/path/daily |
Quote:
|
I think he said at the same time.. ?
Just add an ampersand after each command to put it in the background: command & You might need to redirect the output (check your shell man page): command 2>&1 >/dev/null & |
All times are GMT -7. The time now is 06:14 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123