How to create a command queue and add to it once activated

Page 1 of 4 123 ... LastLast

  1. Posts : 28
    Windows 10
       #1

    How to create a command queue and add to it once activated


    There's a command I often use and the majority of the time it take multiple minutes to complete. I don't want to wait to do the command, so do it as soon as I want to. Sometimes I'd like to do an additional command a short time after but there's minutes left on the running command; 2 things then become a problem
    1. I don't have a good memory so I often forget to do it, and come back to it many minutes (if not hours) after the command is completed, and
    2. when I do remember, the majority of the time some minutes have passed by since the completion, as I do other tasks in the meanwhile and only check back between them.


    Is there a way to create a command queue and add to it once activated? Perhaps there can be 2 command prompts, and the 2nd be tied up to the 1st and have some kind of cron to check its status; for example from 1st prompt run a command to get its process ID, then on the 2nd run a program that use that #, something like
    Code:
    PromptQueue /prid [#]
    , then
    Code:
    PromptQueue /add "[command to be run in the 1st prompt once what its running ends]"
    .

    Thank you kindly for your help. As requested:
    OS Name: Microsoft Windows 10 Pro
    OS Version: 10.0.19044 N/A Build 19044
    OS Manufacturer: Microsoft Corporation
    OS Configuration: Standalone Workstation
    OS Build Type: Multiprocessor Free
      My Computers


  2. Posts : 7,607
    Windows 10 Home 20H2
       #2

    On my Windows 10, 'PromptQueue' is not recognized as an internal or external command, operable program or batch file.

    How to create a command queue and add to it once activated-promptqueue-not-recognized-internal-external-command.jpg

    Is PromptQueue a third-party app?
      My Computer


  3. Posts : 4,187
    Windows 11 Pro, 22H2
       #3

    If I'm understanding your question correctly, what you want to do is run one command (perhaps launching a program) and then move on to run the next command without waiting for the first to complete. Is that correct?

    You can do this by creating a batch file (a file with a .bat extension) and then place the commands in that file with a "start" preceding the commands. For example:
    Code:
    start PromptQueue /prid [#]
    start PromptQueue /add "[command to be run in the 1st prompt once what its running ends]"
    Then simply run the batch file.
      My Computers


  4. Posts : 28
    Windows 10
    Thread Starter
       #4

    Matthew Wai said:
    Is PromptQueue a third-party app?
    DynV said:
    for example
    Rename PromptQueue for ExampleProgramToMakeApromptQueueRememberThisIsAnExampleAndNotArealProgram.

    - - - Updated - - -

    hsehestedt said:
    If I'm understanding your question correctly, what you want to do is run one command (perhaps launching a program) and then move on to run the next command without waiting for the first to complete. Is that correct?
    DynV said:
    There's a command I often use and the majority of the time it take multiple minutes to complete. I don't want to wait to do the command, so do it as soon as I want to.
    I do the 1st command right away, not even waiting even 1 second.
      My Computers


  5. Posts : 7,607
    Windows 10 Home 20H2
       #5

    Please specify what are the 1st, 2nd, 3rd etc commands.
      My Computer


  6. Posts : 28
    Windows 10
    Thread Starter
       #6

    Matthew Wai said:
    Please specify what are the 1st, 2nd, 3rd etc commands.
    The following is an example, I will not give the real commands, they're commands that the vast majority of the time take a long time to complete.
    timeout /nobreak /t 1500
    timeout /nobreak /t 600
    timeout /nobreak /t 1800
      My Computers


  7. Posts : 7,607
    Windows 10 Home 20H2
       #7

    Code:
    timeout /nobreak /t 1500
    timeout /nobreak /t 600
    timeout /nobreak /t 1800
    Do you mean you want the above commands to be run one after another immediately without a delay?
      My Computer


  8. Posts : 28
    Windows 10
    Thread Starter
       #8

    Matthew Wai said:
    Code:
    timeout /nobreak /t 1500
    timeout /nobreak /t 600
    timeout /nobreak /t 1800
    Do you mean you want the above commands to be run one after another immediately without a delay?
    The 1st one immediately, the 2nd one a few minutes later, say 4, and the 3rd some more minutes later, say 6.
      My Computers


  9. Posts : 7,607
    Windows 10 Home 20H2
       #9

    <The 1st command here>
    Timeout.exe 240 /nobreak
    <The 2nd command here>
    Timeout.exe 360 /nobreak
    <The 3rd command here>
      My Computer


  10. Posts : 1,746
    Windows 10 Pro x64 22H2
       #10

    you can write main PS script which writes new "child" PS scripts and executes them in queue fashion.
    The main script would maintain a queue and write child scripts to temporary folder.
    child scripts would exists primarily of single command, ex. single line scripts.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:24.
Find Us




Windows 10 Forums