I have a very simple batch that backs up a set of folders. I run the batch manually without any issue, but when I schedule it to run it start to run fine but never completes. It creates the appropraite dated folder and stops before it ever copies any folders/files.
Here is the code from the .bat
for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set "dt=%%a"
set "YYYY=%dt:~0,4%"
set "MM=%dt:~4,2%"
set "DD=%dt:~6,2%"
set datestamp=%MM%-%DD%-%YYYY%
echo datestamp: "%datestamp%"
md F:\MyArchives\%datestamp%
xcopy U:\Kristi\Project\*.* F:\MyArchives\%datestamp%\ /f/s
I have it set to run as my user name whether I am logged on or not. I have it set to run the highest privileges. It is sched for 1:45 am every day. I have checked Wake the computer to run this task. I am running Windows 7 Enterprise
When I look at the history in Scheduler, it states the following:
- Task Triggered on Scheduler
- Task Engine received message to start task
- Tast Started
- Action started
- Created Task Process
- Action completed
- Task completed
I am at a loss. I have searched this site extensively and I have also googled it until I am blue in the face.
I have also exported the Task xml file and it is listed below:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2014-11-04T10:50:29.1301378</Date>
<Author>AMERICAS\jfges</Author>
<Description>Backs up the Projects folder to the Passport Drive every night. This will create a dated folder that will need to be deleted eventually for space. Batch is to run every night</Description>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2014-11-04T01:45:00</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByDay>
<DaysInterval>1</DaysInterval>
</ScheduleByDay>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>AMERICAS\jfges</UserId>
<LogonType>Password</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>false</AllowHardTerminate>
<StartWhenAvailable>true</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
<UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
<WakeToRun>true</WakeToRun>
<ExecutionTimeLimit>PT8H</ExecutionTimeLimit>
<Priority>7</Priority>
<RestartOnFailure>
<Interval>PT10M</Interval>
<Count>3</Count>
</RestartOnFailure>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\Users\jfges\Desktop\backup.bat</Command>
</Exec>
</Actions>
</Task>
I have tried to provide you guys with everything that I have seen anyone ask for on similar questions that I have read on here. I REALLY hope that someone is able to help me with this.
The only other thing that I can think to tell you is that I am trying to back up approx 17G of data each night. I wouldn't think that would matter since it is not even starting to copy the data over, but I thought I would mention it.
Any help would be greatly apprectiated!