LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   queing jobs? (https://www.linuxquestions.org/questions/linux-newbie-8/queing-jobs-245035/)

dwight 10-20-2004 07:27 AM

queueing jobs?
 
Quick question. I'm compiling a new version of kernel (in bash shell) and it's doing make bzImage right now. Suppose I have to leave the computer for some time, but I want it to start make modules as soon as it finishes make bzImage. So can I queue a job to start after a running one has finished. I know I could have done it easily before I ran the first command by using semicolon, but any way of doing it while the process is already running?
Thanks

trickykid 10-20-2004 07:43 AM

Not really, since it could be at anytime that its done, all depending on what your compiling into it, how fast your machine is, etc.

My suggestion, in the future just throw up a && after each command and that will start them one after the other..

Example:

# make bzImage && make modules

whansard 10-20-2004 08:21 AM

at the prompt where you are running make bzImage, type make modules. it's not really scheduling, but it'll do what you want. it'll run make modules after make bzImage finishes.
if you want to guess at a time it will run, you could sleep 25m;make modules.
you could also hit control-c and run
make bzImage modules
make will skip over the stuff that you just compiled, and go back to about where it left off.

i tried but failed.
bad code follows:

i="1"
while [ $i -ne "0" ]
do
i=$[ps -ef | grep "make bzImage"| wc -l]
sleep 5
done
make modules


All times are GMT -5. The time now is 12:47 PM.