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

Discus and support Batch files appear to start but don't fully execute on Windows 10 Task Scheduler in Windows 10 BSOD Crashes and Debugging to solve the problem; 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... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by Hawkeye007, Jul 7, 2019.

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


    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.

    :)
     
    Hawkeye007, Jul 7, 2019
    #1
  2. jgunning Win User

    Task Scheduler Batch file

    Hi all,

    Looking for some help.Im creating a batch file to run for different users to add a scheduled task. HOWEVER - the whole thing works great and has done for some time.But after i run the batch file on each machine (different users) i have to go into the security options and change the user the task runs in to the unique user of that machine. Is there a way to use the batch file to pull the account name of the machine (or computer name) and use that as the user the task runs in?


    Thanks =)
     
    jgunning, Jul 7, 2019
    #2
  3. Tryx3 Win User
    Tryx3, Jul 7, 2019
    #3
  4. raywood Win User

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

    Start Batch File Minimized via Task Scheduler


    I have a batch file scheduled to run in Task Scheduler in Windows 10. The batch file runs on schedule, but it opens a full CMD window. I have tried entering variations on start /min in the Task Scheduler properties, but these seem to have no effect.

    The particular batch file opens and then pauses at a PAUSE statement, waiting for user response. I want it to start minimized partly because, when it opens to a full CMD window, it captures keystrokes, if I happen to be typing. In that case, the newly opened batch file blows past the pause and proceeds with its next steps. I don't want that to happen.

    Possibly I am using the wrong term. When I say "minimized," I mean that the batch file will be visible as an item on the taskbar, but its window will not open up onscreen. To access the batch file, I will have to coolswitch to it or click on its taskbar icon.

    So the question is, how can I start this batch file minimized, in the sense that it will open as a taskbar icon but not as a full CMD window?
     
    raywood, Jul 7, 2019
    #4
Thema:

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

Loading...
  1. Batch files appear to start but don't fully execute on Windows 10 Task Scheduler - Similar Threads - Batch files appear

  2. Task Scheduler is failing to execute Batch File when set to "logged in or not". This was...

    in Windows 10 BSOD Crashes and Debugging
    Task Scheduler is failing to execute Batch File when set to "logged in or not". This was...: I have a batch script that runs robocopy on a folder to archive files to a network drive, on a Windows 10 Pro machine; Note: These machines are on a domain, but have been disconnected from the domain at a client site for long time. This has not been a problem so far, but...
  3. Task Scheduler is failing to execute Batch File when set to "logged in or not". This was...

    in Windows 10 Gaming
    Task Scheduler is failing to execute Batch File when set to "logged in or not". This was...: I have a batch script that runs robocopy on a folder to archive files to a network drive, on a Windows 10 Pro machine; Note: These machines are on a domain, but have been disconnected from the domain at a client site for long time. This has not been a problem so far, but...
  4. Task Scheduler is failing to execute Batch File when set to "logged in or not". This was...

    in Windows 10 Software and Apps
    Task Scheduler is failing to execute Batch File when set to "logged in or not". This was...: I have a batch script that runs robocopy on a folder to archive files to a network drive, on a Windows 10 Pro machine; Note: These machines are on a domain, but have been disconnected from the domain at a client site for long time. This has not been a problem so far, but...
  5. Task Scheduler - Batch File

    in Windows 10 Gaming
    Task Scheduler - Batch File: I am attempting to use Task Scheduler to run a batch file automatically every day. I am following instructions that I found on the Web. As far as I can tell I have set up Task Scheduler correctly, the only problem being that it doesn't run! I have uploaded screenshots of the...
  6. Task Scheduler - Batch File

    in Windows 10 Software and Apps
    Task Scheduler - Batch File: I am attempting to use Task Scheduler to run a batch file automatically every day. I am following instructions that I found on the Web. As far as I can tell I have set up Task Scheduler correctly, the only problem being that it doesn't run! I have uploaded screenshots of the...
  7. What Could Be Disabling Batch Files Scheduled in Task Scheduler?

    in Windows 10 Support
    What Could Be Disabling Batch Files Scheduled in Task Scheduler?: I'm using Win10 Pro 2004. I go to Win-R > taskschd.msc > Task Scheduler Library. I see a number of batch files that I have scheduled to run at various times. I see that today, like yesterday, their status is Disabled. Yesterday, when I saw that, I right-clicked > Enable. But...
  8. use Task Scheduler to start batch file, minimized?

    in Windows 10 Support
    use Task Scheduler to start batch file, minimized?: I have already tried to find the solution using google, but literally none of them worked! At one point I edited the file/folder names, and changed the locations to those in the "solutions" but even that didn't work! You are my last hope! is there any way, any at all, you...
  9. Problems automating a batch file with task scheduler

    in Windows 10 Support
    Problems automating a batch file with task scheduler: I want run this bat file from task scheduler @Rem %pf% expands to the right program location depending if it is x86 or x64 system @setlocal @set pf=%ProgramFiles% @if not "[%ProgramFiles(x86)%]"=="[]" set pf=%ProgramFiles(x86)% @Rem %macropath% expands to the demo...
  10. Start Batch File Minimized via Task Scheduler

    in Windows 10 Support
    Start Batch File Minimized via Task Scheduler: I have a batch file scheduled to run in Task Scheduler in Windows 10. The batch file runs on schedule, but it opens a full CMD window. I have tried entering variations on start /min in the Task Scheduler properties, but these seem to have no effect. The particular batch...