Batch files appear to start but don't fully execute on Windows 10 Task Scheduler

  • Thread starter Thread starter Hawkeye007
  • Start date Start date
H

Hawkeye007

Guest
I recently set up a new system with Windows 10 Pro and copied the C:\Batch folder to the new system

These systems are essentially identical in their hardware configuration except for the motherboard, memory & video card. ( Borh are ASUS Motherboards and Video cards with i7 Processors.)

All drives are duplicated in size, manufactures and drive letter assignment.



I use Robocopy in a batch file to copy files at the end of the day to a second set of hard drives on the same box. This has been executing perfectly on Windows 7 for years.



When I attempt to set this up in Scheduler on Windows 10, Scheduler says it is running but there is no activity taking place. Task Manager and Resource Monitor bear this out not to mention the obvious that the files aren't copied across.

When I execute this batch file from the command prompt it runs as expected. There are no "call" statements in the batch file.



Example:

Robocopy /MIR /MT:8 /R:2 /W:5 /Log:H:\!BackupLogs\BULog.txt /X /V /TEE "C:\Batch" "H:\DataBU\Batch"



I have configured Task Scheduler as follows:



Under General Tab I have set the user account under Security Options to the Domain user that has local admin rights.

It is set to run whether user is logged on or not and with the highest privileges.

Configure for Windows 10 is selected



Triggers; it is set to run daily at 23:00:00. It is set to stop the task if it runs later than 1 day and it is enabled.



Actions tab is set to 'Start a Program' and the full path to the batch file is correct. There are no arguments added and I have entered 'C:\Batch' as the 'Start In' option.



Conditions have Start task only if on AC power and Wake computer to run this task selected.



Settings have the following selected:

- Allow task to be run on demand

- Run task as soon as possible after . . .

- Stop task if runs longer is set to 1 day

- If the running task does not end . . . force it to stop

And 'Do not start a new instance' is selected



The History will show;

- Event 107 - Task Triggered on Scheduler

- Event 129 - Created Task Process

- Event 100 - Task Started

- Event 200 - Action Started



And it will sit there until I manually stop it. I haven’t let it run for 24 hour but this task should only take seconds.

On my W7 box, this task executes and ends in under 3 minutes daily.


Any suggestions would be appreciated.

Continue reading...
 
Back
Top