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. GPO for Scheduling Tasks not executed

    in Windows 10 Customization
    GPO for Scheduling Tasks not executed: Hello, I should make GPO to change one wallpaper at 07:00 AM and change other wallpaper at 03:00 PM. I have made two bat files. I want to execute them with schedules tasks via GPO. My DC is Windows Server 2008 R2 Standard, The client PC is Windows 10. My bat file content...
  3. when i start task scheduler service . an error window appear

    in Windows 10 BSOD Crashes and Debugging
    when i start task scheduler service . an error window appear: i have GTX 1050Ti and i downloaded geforce experience but when i opened the installer it said that windows task scheduler service should be running so i went to services.msc and started task scheduler but this window appear saying the task scheduler service on local computer...
  4. Task Scheduler is not starting

    in Windows 10 BSOD Crashes and Debugging
    Task Scheduler is not starting: Whenever I try to start Task Scheduler, it always brings me to an error. It says, "The Task Scheduler service on Local Computer started and then stopped. Some services stop automatically if they are not in us by other services or programs. I need to start this, so I can...
  5. Task scheduler won't start

    in Windows 10 Software and Apps
    Task scheduler won't start: I have the problem whare the task scheduler in services is set to automatice but fails to start and log in is greyed out. I have tried many solutions and none have worked. However I did find a solution and it was down to my own error. I used a program called DISMPP-10 and...
  6. Parallel batch jobs in one scheduled task

    in Windows 10 Support
    Parallel batch jobs in one scheduled task: Parallel batch jobs in one scheduled task hi, This should be an easy answer. I want to create one scheduled task, it will be called "CLEAR_PHOTOSBYDATE", see attached pic or (approximate example, not literal job...yet)...
  7. 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...
  8. Task Scheduler Will Not Start

    in Windows 10 Support
    Task Scheduler Will Not Start: Hey everyone, Have an issue with task scheduler not stating which is causing issues with say Nvidia Geforce Experience not starting as it requires it to update. When I try to start it from services I get that error. [img] When I try to launch the task scheduler...
  9. Tasks running but not appearing in Task Scheduler: Need to edit

    in Windows 10 Performance & Maintenance
    Tasks running but not appearing in Task Scheduler: Need to edit: Hi. After upgrade to windows 10, tasks still run but don't appear in task scheduler so I can't edit them. Where are they kept? More importantly, how to I get them to show up where I can edit them? When opening Task Scheduler I get at least 50 boxes I have to close before I...
  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...