By Awesome As

2016-10-18 11:34:46 8 Comments

I have a batch file which will copy certain folders from an absolute path over as a backup. I currently need to make it so every midnight the batch file will be executed - and that's during the time when no one is on the computer.

Currently I've set up the task in Windows Task Scheduler to Run whether the user is logged in or not, saving the administrator's password, set a trigger each day at midnight, and start the bat file in its specified location with the path to the folder (without quotation marks) as the working directory.

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4"     xmlns="">
    <Description>Creates a backup of DemoTestTool daily</Description>
    <Principal id="Author">
  <Actions Context="Author">
      <Command>\\tsclient\T\Main\Demo- Test_Tool\Programdata\Backup\BackupSys.bat</Command>

Here's the complete setup exported as XML - problem is that I can't simply assume that someone will be online to have the scheduled task run, as it's meant to run automatically when no one is using the system.

My problem is that while the task may be able to run when I manually run it (press the green run icon in the Task Scheduler), the task won't execute at the planned time, possibly due to the \tsclient\T drive not being available at the given time.

Is there any way I can access this drive when there aren't a dedicated user online on the computer?

Network location of backup batch file

The task is configured for Windows Server 2012 R2.


Related Questions

Sponsored Content

13 Answered Questions

[SOLVED] Windows batch files: .bat vs .cmd?

0 Answered Questions

5 Answered Questions

[SOLVED] Split long commands in multiple lines through Windows batch file

  • 2008-09-16 03:04:34
  • Dan
  • 389184 View
  • 693 Score
  • 5 Answer
  • Tags:   batch-file

9 Answered Questions

3 Answered Questions

[SOLVED] How to check if a file exists from inside a batch file

  • 2010-12-02 21:52:59
  • sab
  • 1023922 View
  • 451 Score
  • 3 Answer
  • Tags:   windows batch-file

1 Answered Questions

2 Answered Questions

[SOLVED] .BAT file not running in task scheduler

1 Answered Questions

[SOLVED] Task Scheduler running a Windows Batch file

5 Answered Questions

[SOLVED] Windows Batch File - Move File not working in Task Scheduler only

Sponsored Content