Ubuntu_14.04 [SOLVED]: How to manually queue processes

Ubuntu_14.04 [SOLVED]: How to manually queue processes

Home Forums Ubuntu 14.04 Ubuntu_14.04 [SOLVED]: How to manually queue processes

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #15978



    Is there any kind of a program or a script that I can manually queue processes of applications on Ubuntu? For example there are 40 processes running at a specific point of time and 10 more are about to run in some time after.Is there anyway I can tell the system to run for example the 3 out of 10 at the same time and after they complete to run the 7 remaining one at a time in a specific order?



    Accepted AnswerAnswer

    You could achieve that result with a job-aware shell (zsh,bash).

    For instance in bash:

    # run first 3 apps in background and in parallel
    app1 &
    app2 &
    app3 &
    # wait for all background jobs to finish
    # run the remaining apps in specified order

    The & means run the program in the background (i.e. you get another shell prompt the moment the program is started). All backgrounded jobs run in parallel. However, backgrounded jobs cannot access the standard input (i.e. you can’t provide keyboard input to them – well, you can, by bringing to the foreground first, but that’s another story).

    Source: https://stackoverflow.com/questions/26167669/how-to-manually-queue-processes
    Author: isedev
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.