Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Scheduled Task history indicates task completed successfully but....


26 Jun 2013   #1

Various - W7 32bit, 64bit
 
 
Scheduled Task history indicates task completed successfully but....

Hi,

New here. I'm using a Scheduled Task to fire a very simple bat file that pulls, compresses and pushes a set of files to a different network directory. The bat file runs fine manually. On a networked desktop I have set up the task to run at about 5am est (waking the machine), as highest authority, when connected to the network, even when user is logged off and such. The task history tab shows 'Action complete' and 'Task complete' as anticipated but there are no new files (or the log that is created) as expected. I've verified the paths in the bat file. I'm confused about the "history" interpretation.

If the task/action complete successfully - what exactly does that mean?! As I mentioned - I can run the file manually with success - the files are completed and exist. It seems when the machine is logged off and asleep - it will wake up, run 'something' and show success.

Any suggestions to help trouble shoot are greatly appreciated. I wanted to run the task 'at logoff' but seems that is not readily available due to possible corruption/hanging and preventing that type of trigger from happening. Logon may become my option next - I just didn't want to stress the network in anyway if everyone is at once - but it is actually a very small office of users.

Sorry for the long post.

John


My System SpecsSystem Spec
.

27 Jun 2013   #2

Various - W7 32bit, 64bit
 
 

Just an update - I can run this bat file manually but the file will NOT run automatically - even IF the PC is powered up It is set to run at the highest authority, wake if asleep and connected to the network. I hope someone has some ideas - I'm about at a loss. All forum searching I already have covered. Thanks in advance.

P.S. Is there a thread to this I can read responses? Someone responded to me and I received an email - but when logging in I only see my single question here....just curious.
My System SpecsSystem Spec
27 Jun 2013   #3

Windows 8 Core X64
 
 

What account do you have it set to run under?

Export the task then post here so we can look at it.

Right click on it and select Export. It will be saved as a .xml file. Copy and paste it's content here or zip and attach here.
My System SpecsSystem Spec
.


28 Jun 2013   #4

Various - W7 32bit, 64bit
 
 

Hi Ztruker - thank you for the offer of assistance.

I have it set to run with the highest authority - all users configured for the desktop are under the Administrators group on the machine as well. I am attaching the xml export of the job. I appreciate any suggestions. I'd rather have this wake and run the bat file when users are not in the office as opposed to after login to avoid complaints about the DOS screen popup - OR them opening outlook before it's backed up (one of the backups in the bat job) If that's what I have to manage then I will have to manage it.....thanks!


Attached Files
File Type: zip Selective Backup.zip (1.2 KB, 7 views)
My System SpecsSystem Spec
28 Jun 2013   #5

Windows 8 Core X64
 
 

That looks okay to me. Can you post the content f the bat file please?
My System SpecsSystem Spec
01 Jul 2013   #6

Various - W7 32bit, 64bit
 
 

Hi Ztrucker - here is the bat file contents....very simple - probably a more efficient way to do this but it seems to work for my need - and I'm just a hack anyway!

Thanks for looking at it - it runs manually and I'm just taking some outlook files and the contents of a single folder and moving it from the local desktop over to a shared folder on our server "U:/" . Each desktop connects to the logged in users's shared folder on our network - so U:/ is all I need for the path - works great when run manually, as I mentioned. And this will run 'at logon' as well - it's just the waking up of the desktop that I can't seem to get to work for me.

Here is the file contents:

(btw - I have some 'renaming' activities that I use on a laptop that I have set to run at login - but on this desktop version of the bat I've commented out the renaming/deletion and changed the file it creates with a prefix of "DT14" to differentiate a test case as I'm testing with my laptop and on a desktop I log into and didn't want to hose my laptop's version of the backup (working great but at login to the network for me) of outlook and other files.....didn't want to confuse you with diff names/details etc.)



::Create the Log file of bat file execution
::
::
Echo >U:\BackupLog.txt


:: Outlook file compression and backup
::
::
for %%A in (C:\Users\%USERNAME%\AppData\Local\Microsoft\Outlook) do "C:\Program Files\7-Zip\7z.exe" a -tzip -mx5 "U:\outlooknewDT14.zip" -xr!*.bat "C:\Users\%USERNAME%\AppData\Local\Microsoft\Outlook">>U:\BackupLog.txt
::REN "U:\outlook.zip" "outlookold.zip"
REN "U:\outlooknewDT14.zip" "%USERNAME%outlook.zip"
DEL "U:\outlooknew.zip"
DEL "U:\outlookold.zip"



::User file compression and backup
::
::
for %%A in (C:\Users\%USERNAME%\Documents\Vitusa) do "C:\Program Files\7-Zip\7z.exe" a -tzip -mx5 "U:\VitusanewDT14.zip" -xr!*.bat "C:\Users\%USERNAME%\Documents\Vitusa">>U:\BackupLog.txt
::REN "U:\Vitusa.zip" "Vitusaold.zip"
REN "U:\VitusanewDT14.zip" "%USERNAME%Vitusa.zip"
DEL "U:\Vitusanew.zip"
DEL "U:\Vitusaold.zip"

Thanks,

John
My System SpecsSystem Spec
01 Jul 2013   #7

Windows 8 Core X64
 
 

That's pretty straight forward. Try this.

Change the command to cmd /k C:\BackupDT14.bat

That should open the batch file in a Command Prompt window and leave it open. Maybe you can spot what is going wrong then????
My System SpecsSystem Spec
01 Jul 2013   #8

Various - W7 32bit, 64bit
 
 

thanks - I'll have to try it tomorrow in a forced test (logged off) to see - problem is that it's simply not running. Or should I say not waking the computer - so I'd expect this will open and leave open IF it is opening! thanks - will see what happens and post either way.
My System SpecsSystem Spec
Reply

 Scheduled Task history indicates task completed successfully but....




Thread Tools



Similar help and support threads for2: Scheduled Task history indicates task completed successfully but....
Thread Forum
setting up a scheduled task General Discussion
backup task has not been completed System Security
Scheduled task does not run General Discussion
Scheduled task problems Performance & Maintenance
Scheduled task invisible General Discussion
Scheduled Task revisit... General Discussion
Huuuuge Task Completed! Chillout Room

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 12:40 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

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