Might also check the logs.
Event Viewer\Applications\Microsoft\Windows\TaskScheduler\Operational
--please don't forget to Accept as answer if the reply is helpful--
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
My team and I have just upgraded to Windows Server 2019 from Windows Server 2008. We had the Task Scheduler running without issue on 2008, but now our tasks don't work on Server 2019 and I'm looking for some help!
I've been all over Google looking for an answer to this problem. I've changed from one-time trigger to daily trigger and back again. I've tried several different users, given full permission to them to access all of the folders. I've tried to run it and it just runs forever with no end.
To give you an example, we would like to run a weekly reboot of remote computers on our network and we're calling it Non-care Weekly Reboots:
Program/script:
C:____________.bat
I've tried putting the Program/Script as just " ____.bat" and Start in: C:________\ . I've tried changing the C: to \ ____________.bat to have it reference the server it's on. I'm really at a loss.
This is the script we're running in specified .bat file.
Is there anything anyone can see that needs to be corrected?
Thank you!
Might also check the logs.
Event Viewer\Applications\Microsoft\Windows\TaskScheduler\Operational
--please don't forget to Accept as answer if the reply is helpful--
For Sysinternals utilities you need to add the /accepteula switch.
Why don't you just use Windows shutdown.exe?
The task isn't running at all
I'd check the logs.
Event Viewer\Applications\Microsoft\Windows\TaskScheduler\Operational
--please don't forget to Accept as answer if the reply is helpful--
You are not capturing the output of the programs being called by the .bat file. You are blindly executing the script and wondering why it doesn't work. You have to analyze the messages produced by the script and do basic computer troubleshooting.
In the task scheduler, change the program/script field to:
C:\xxxx\yyyy\zzzz.bat 1>C:\xxxx\Logs\zzzz.log 2>&1
If you need to capture a log for each execution, add in the date+time. Be sure to put the file name in quotes because you may get a space in the hour value.
C:\xxxx\yyyy\zzzz.bat 1>"C:\xxxx\Logs\zzzz.%date:~10,4%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%%time:~6,2%.log" 2>&1
http://steve-jansen.github.io/guides/windows-batch-scripting/part-4-stdin-stdout-stderr.html