stop the next process based on A process out parameter in Windows Task scheduler

Madhu P 21 Reputation points
2021-09-07T09:32:15.197+00:00

stop the next process based on A process out parameter in Windows Task scheduler

More deatils:

Wnndows task schedulerte

:Job1

  1. A.exe
  2. B.exe
    if A.exe Run completed and out Parameter is "Fail" then No need to run B.exe( i.e. exit the job1)

Please advise in using Task Scheduler in Single Job with 2 exe run.

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,926 Reputation points
    2021-09-08T07:25:19.527+00:00

    Hi there,

    In your case, you need setup two scheduled tasks, each with the same executable, but different parameters depending on what you want that instance to do.

    You can try out these commands to see if it is helpful
    https://learn.microsoft.com/en-us/powershell/module/scheduledtasks/stop-scheduledtask?view=windowsserver2019-ps

    Hope this Answers all your queries , if not please do repost back .
    If an Answer is helpful, please click "Accept Answer" and upvote it : )

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.