2 years ago
#2345

asmgx
How to see command prompt window when it runs from Task Schedular?
I have a command that I run every 5 minutes
I added a task to the task scheduler to run that command
This is my command
D:\files\runPipeline -i D:\Input\ --o D:\Output\ -l D:\lookup\code.xml --user xyz --pass ****
To automate this
I added it to a Task Scheduler
but the command prompt never opened
I want to see the command prompt running the command I sent and see the results there.
how to do that?
attempt 2
put the command line in .bat file and run it
results: the same, command prompt did not open
Here is the out put of
C:\Users\Administrator>schtasks /query /TN "RunInCMD" /v /fo list
Folder: \
HostName: WIN-FSTAAAAAAAS
TaskName: \RunInCMD
Next Run Time: N/A
Status: Running
Logon Mode: Interactive/Background
Last Run Time: 2022-01-01 10:12:04 PM
Last Result: 267009
Author: WIN-FSTAAAAAAAS\Administrator
Task To Run: D:\files\comm.bat
Start In: D:\files\
Comment: N/A
Scheduled Task State: Enabled
Idle Time: Disabled
Power Management: Stop On Battery Mode
Run As User: Administrator
Delete Task If Not Rescheduled: Disabled
Stop Task If Runs X Hours and X Mins: 02:00:00
Schedule: Scheduling data is not available in this format.
Schedule Type: At system start up
Start Time: N/A
Start Date: N/A
End Date: N/A
Days: N/A
Months: N/A
Repeat: Every: N/A
Repeat: Until: Time: N/A
Repeat: Until: Duration: N/A
Repeat: Stop If Still Running: N/A
I used PAUSE
in the .bat file.
but still nothing showed up
EDIT
After limiting some options, I found that
Run whether user is logged in or not, is the cause of the issue
cmd
command-prompt
taskscheduler
windows-task-scheduler
0 Answers
Your Answer