Task Scheduler: How to run more than one program in Actions


  1. Posts : 481
    Windows 10 pro 1903 1862.145
       #1

    Task Scheduler: How to run more than one program in Actions


    I have a scheduled task to run Avast AshCmd.exe every day. The entry in Actions is "C:\Program Files\AVAST Software\Avast\ashCmd.exe / @=Quick/r=*~". (Quick is the name of my scan.) I'd like to add another command, to view the Avast log afterwards. Like "Notepad c:\ProgramData\AVAST Software\Avast\report\Quick.txt". (I'll work out the exact grammar later.)

    Is that possible or will I have to wrap the two commands into a batch file?
      My Computer


  2. Posts : 61,918
    64-bit Windows 11 Pro for Workstations
       #2

    Hello mate,

    You can add "&" inbetween the command sets with a space before and after to run both commands in a singe line.

    For example:

    Code:
    "C:\Program Files\AVAST Software\Avast\ashCmd.exe / @=Quick/r=*~" & "Notepad c:\ProgramData\AVAST Software\Avast\report\Quick.txt"
      My Computers


  3. Posts : 481
    Windows 10 pro 1903 1862.145
    Thread Starter
       #3

    Wow! Guess I missed detailed instructions for TS -- are there any? And where can they be found? Thanks, Brink
      My Computer


  4. Posts : 61,918
    64-bit Windows 11 Pro for Workstations
       #4

    None would include the multiple commands in one command line option.

    Did that work for you?
      My Computers


  5. Posts : 481
    Windows 10 pro 1903 1862.145
    Thread Starter
       #5

    I'll let you know tomorrow. Scheduled to run at 7:00 PM.

    PS Scheduler asked whether I wanted to include the last part as an argument. I said "no" and the line remained with the two commands.
      My Computer


  6. Posts : 481
    Windows 10 pro 1903 1862.145
    Thread Starter
       #6

    Well, I forgot it was Sunday, when I run a more thorough scan. So I attempted to run it manually. It started but froze before it could call cmd. I have a shortcut to the log file, so not a big problem.
      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 12:37.
Find Us




Windows 10 Forums