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
jfk92

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
jfk92

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
Ztruker

Windows 10 Pro 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
jfk92

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
Ztruker

Windows 10 Pro X64
 
 

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

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
Ztruker

Windows 10 Pro 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
jfk92

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
Thread Forum
Scheduled Task: Configure for? - Help please.
Hi, I've decided to create a scheduled task to clean up after windows updates. I've created the task and scheduled it to run every second Saturday of every month (to make sure that it only runs a few days after patch Tuesday). My problem is that I don't understand the "Configure for"...
Performance & Maintenance
setting up a scheduled task
I am trying to use the free program FreeFileSync to do a nightly back up of some files and have had some trouble setting up the job. The syntax for the job would be "FreeFileSync myjob.batch" run from the utilities location. I set the trigger to 2am each day, with the action to start the program...
General Discussion
Edit a scheduled task
I want to edit a scheduled task but canít identify which one due to their mysterious names. How can I determine the right one?
General Discussion
backup task has not been completed
Recently installed kaspersky pure 2. 0 .Getting error message that backup task has not been completed. I have read that this is a known issue. Is there a solution to correct this problem? Thanks.
System Security
Scheduled task invisible
Hi, I recently managed to create a musical wake up, using sheduled task and a bat file wich launches mplayerclassic and reads automatically the desired playlist. Problem is, with this sheduled task, I can't stop the player because it doesn't appear anywhere. I verified that I didn't checked...
General Discussion
Huuuuge Task Completed!
Well its only taken me a couple of months but I've finally achieved my goal! Basically I was sick of getting disk after disk out to watch a film/tv episode as well as them getting scratched etc. I also realised how many films I'd lent out and not got back! :mad: (bet you have if you think!) ...
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 00:49.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App