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

Discus and support Task Scheduler is failing to execute Batch File when set to "logged in or not". This was... in Windows 10 Gaming to solve the problem; 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... Discussion in 'Windows 10 Gaming' started by JD_SF21, Aug 29, 2023.

  1. JD_SF21 Win User

    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 maybe this is the issue below?8 months ago I set up a bunch of machines to run this script. I set up a task to do so, and to make sure it doesn't bother the user, it's set to run under a local admin account "itadmin" every 5 minutes.This has been running without issue on all these machines for months. Also, it runs fi

    :)
     
    JD_SF21, Aug 29, 2023
    #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, Aug 29, 2023
    #2
  3. 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, Aug 29, 2023
    #3
  4. Tryx3 Win User

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

    Tryx3, Aug 29, 2023
    #4
Thema:

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

Loading...
  1. Task Scheduler is failing to execute Batch File when set to "logged in or not". This was... - Similar Threads - Task Scheduler failing

  2. Task scheduler not executing executable file properly

    in Windows 10 Gaming
    Task scheduler not executing executable file properly: I am executing a bat file which is calling a power shell script.Power shell script is doing the below activity.Step1: It truncat the table and insert it from the file present in the server.Step2: execute the executable file.Step3: create the file and archive it in the...
  3. Task scheduler not executing executable file properly

    in Windows 10 Software and Apps
    Task scheduler not executing executable file properly: I am executing a bat file which is calling a power shell script.Power shell script is doing the below activity.Step1: It truncat the table and insert it from the file present in the server.Step2: execute the executable file.Step3: create the file and archive it in the...
  4. Task scheduler not executing executable file properly

    in Windows 10 Customization
    Task scheduler not executing executable file properly: I am executing a bat file which is calling a power shell script.Power shell script is doing the below activity.Step1: It truncat the table and insert it from the file present in the server.Step2: execute the executable file.Step3: create the file and archive it in the...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...