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

9 Answered Questions

4 Answered Questions

13 Answered Questions

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

5 Answered Questions

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

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

9 Answered Questions

[SOLVED] What does %~d0 mean in a Windows batch file?

  • 2008-09-21 20:41:19
  • Chris Smith
  • 330552 View
  • 359 Score
  • 9 Answer
  • Tags:   windows batch-file

2 Answered Questions

[SOLVED] .BAT file not running in task scheduler

5 Answered Questions

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

Sponsored Content