Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Forums > Software

Vista - Scheduled Task - States Task Ran - No Results

Reply
 
Old 03-08-2009   #1 (permalink)


Vista Home Premium 64bit.
 
 

Scheduled Task - States Task Ran - No Results

I have reviewed previous postings about similar issue. I am running with the highest privileges. I have a bat file that runs without errors on the command line. Uses robocopy to back up document directory. The scheduler history states it started, action completed with an error code 16 (don't know what this means) and task successfully completed? But I do not think it is actually executing the bat file.

My System SpecsSystem Spec
Old 03-10-2009   #2 (permalink)


Vista Home Premium 64 bit SP1
 
 

Re: Scheduled Task - States Task Ran - No Results

Just an ordinary error code of 16 decimal is "the directory could not be removed" if that's any help. A google on Windows Error Lookup Tool should find the freebie I'm using.

Whatever the batch file is it might work better if you implement it in AutoIt3 and compile it. To run external executables in AutoIt3 is very easy. It's free, and it has a forum full of programmers if you get stuck.
My System SpecsSystem Spec
Old 03-10-2009   #3 (permalink)


Win7x64
 
 

Re: Scheduled Task - States Task Ran - No Results

C:\>net helpmsg 16
The directory cannot be removed.

C:\>


Works on all machines. No need for "formatter" utilities.
My System SpecsSystem Spec
Old 03-10-2009   #4 (permalink)


Vista Home Premium 64 bit SP1
 
 

Re: Scheduled Task - States Task Ran - No Results

Quote  Quote: Originally Posted by H2SO4 View Post
C:\>net helpmsg 16
The directory cannot be removed.

C:\>


Works on all machines. No need for "formatter" utilities.
Then again, neither method handles HRESULT error codes.
Mine does






free for personal use at your own risk.
My System SpecsSystem Spec
Old 03-10-2009   #5 (permalink)


Vista Home Premium 64bit.
 
 

Re: Scheduled Task - States Task Ran - No Results

Thanks to all! I found an error in the script which I ran multiple times on the command line. However I do have another problem. The script copies my a directory to a network drive. Works OK, however, the top directory I created on the NAS does not show up, only the second level. However, when I delete the content under the top directory I created it shows backup up. Any idea why this is happening?

@ECHO OFF
set d=R:
rem
rem map network drive
net use %d% /d /y
rem
rem map network drive
net use %d% "\\RND4250\hp-dv71245dx\Daily Backups"
rem
rem generate directory name
set h=%time:~0,2%
IF %time:~0,2% LSS 10 (set h=0%time:~1,1%)
set m=%time:~3,2%
set dirname=%date:~10,4%-%date:~4,2%-%date:~7,2%
rem
rem change drive & directory
%d%
rem
rem create directory
IF EXIST %dirname% (Set dirname=%dirname%-%h%%m%)
mkdir %dirname%
rem
rem generate robocopy command
set from=C:\Users\Steve\Documents
set to=%d%\%dirname%
robocopy "%from%" "%to%" /E /COPYAT /R:10 /Z /XJD /log:%d%\RoboCopyLog.txt
rem
rem unmap network drive
net use %d% /d /y
exit
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
How to end a Scheduled Task Vista General
scheduled task failure PowerShell
exe for scheduled task .NET General
How do you rename a scheduled task Vista account administration
Can a Scheduled Task be renamed? Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46