Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Gold Lounger Rebel's Avatar
    Join Date
    Jul 2001
    Location
    Canada
    Posts
    3,024
    Thanks
    0
    Thanked 1 Time in 1 Post

    Scheduled Tasks - Batch File (XPP-SP1)

    I had a small batch file running on a client's computer which ran every morning (scheduled task) at 3:00 am. The client has a small (3 computer) peer to peer network. This batch file simply backed up (copied) 2 files (Access database files) from one of the computers to the secretary's computer. This scheduled batch file is located on the secretary's machine. This computer was originally running Windows 98, but recently, the client upgraded to Windows XP Pro. After this upgrade, this scheduled task no longer ran.

    Yesterday, I was at the client's site and determined that this scheduled task required a user name and password to run. I created a new user and password and recreated the scheduled backup batch file. I tested it several times by simply altering the system clock and watching what transpired. Each time, the "Scheduled Tasks" indicated that the procedure had run successfully at the scheduled time. However, upon checking the destination folder, no files had been copied.

    However, when I went directly to the batch file (in Windows Explorer) and double clicked on the file, the command window popped up and I watched as each of the files was copied successfully to the correct folder.

    Does anyone have any idea why this is happening? I don't understand why I can execute the batch file directly but not as a scheduled task (even though the system reports that the scheduled task completed succesfully).

    Thanks in advance for any help.
    John
    A Child's Mind, Once Stretched by Imagination...
    Never Regains Its Original Dimensions

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    Rebel, try putting a pause statement in the batch file so it will pause and you can see the task as it executes. I have a similar phenomenon that just started occuring on my XP Pro workstation that I'm at a loss to explain - it's a hack to work around a memory leak in NAVAPSVC.EXE by stopping and restarting the service, and it does exactly what you describe. Manual execution, no problem. Scheduled task? It doesn't care to execute but reports it as successful. I can't seem to find a reference in the KB about this one either.
    -Mark

  3. #3
    Gold Lounger Rebel's Avatar
    Join Date
    Jul 2001
    Location
    Canada
    Posts
    3,024
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    Mark,

    Thanks for the reply. However, if I insert a "pause" statement in the batch file, won't the execution stop until I "press any key to continue" ? The batch file is supposed to run unattended at 3:00 am when nobody is using the system.

    John
    John
    A Child's Mind, Once Stretched by Imagination...
    Never Regains Its Original Dimensions

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    John - you're correct. But what I was thinking was that you could schedule the task to execute at a time when you could monitor the console, or execute it immediately so that you could see the results. Alternatively, you could pipe the output to a text file and see if the text file is created - which might be a better option.
    -Mark

  5. #5
    Gold Lounger Rebel's Avatar
    Join Date
    Jul 2001
    Location
    Canada
    Posts
    3,024
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    Thanks Mark - I'll give that a try.

    John
    John
    A Child's Mind, Once Stretched by Imagination...
    Never Regains Its Original Dimensions

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    Good deal...let me know if you find anything interesting, and I will do likewise. I haven't given up on fixing the scheduler problem, because in my case removing and reinstalling Norton Systemworks would be a major operation entailing massive updates to be downloaded. Plus, I know now that it's not an isolated incident based on your experience!
    -Mark

  7. #7
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    John, a further addendum - I just discovered that my scheduled tasks that were not executing were due to a blank password. In XP, blank passwords are not allowed for scheduled tasks - something that you should check. Make sure that the tasks have valid user credentials.
    -Mark

  8. #8
    Gold Lounger Rebel's Avatar
    Join Date
    Jul 2001
    Location
    Canada
    Posts
    3,024
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    Yes Mark, I discovered the blank password issue. I then assigned a UserID and Password to the task but still no luck. Will keep trying and will let you know if I come up with something.

    John
    John
    A Child's Mind, Once Stretched by Imagination...
    Never Regains Its Original Dimensions

  9. #9
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,572
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    John,
    Also, double check to make sure the user you created has the correct permissions for the destination folder.

    Joe
    Joe

  10. #10
    Gold Lounger Rebel's Avatar
    Join Date
    Jul 2001
    Location
    Canada
    Posts
    3,024
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    Joe,
    I acturally created a new Administrator (for testing purposes) and assigned that ID and Password to the task - didn't work. I am currently searching the knowledge base but haven't come up with anything yet. I may end up giving MS tech support a call.

    John
    John
    A Child's Mind, Once Stretched by Imagination...
    Never Regains Its Original Dimensions

  11. #11
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,572
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    John,
    Did you enter the user as "computernameusername"?

    Joe
    Joe

  12. #12
    Super Moderator
    Join Date
    Dec 2000
    Location
    Renton, Washington, USA
    Posts
    12,560
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    I think you must be logged in as that user when setting up the tasks. Did you do this while logged in as the new test user?

    Now running HP Pavilion a6528p, with Win7 64 Bit OS.

  13. #13
    5 Star Lounger
    Join Date
    Dec 2002
    Location
    Perth, Western Australia, Australia
    Posts
    730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    If you can't get a resolution with Windows task manager, you could try the freeware <!post=cron scheduler,245030>cron scheduler<!/post> posted in the Software forum. It may be a way around your hassles.
    <font face="Comic Sans MS" color="blue">TimOz</font>
    <img src=/S/flags/Finland.gif border=0 alt=Finland width=30 height=18> <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  14. #14
    Gold Lounger Rebel's Avatar
    Join Date
    Jul 2001
    Location
    Canada
    Posts
    3,024
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    Yes I did Joe.
    John
    A Child's Mind, Once Stretched by Imagination...
    Never Regains Its Original Dimensions

  15. #15
    Gold Lounger Rebel's Avatar
    Join Date
    Jul 2001
    Location
    Canada
    Posts
    3,024
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Scheduled Tasks - Batch File (XPP-SP1)

    Dave,
    Yes - I logged in as the new user (administrator) and set up the task. Still indicated that it ran, but no files copied. Very strange - I set up several scheduled tasks on my own computer (for testing) and they all completed as they should. Will have to do a more thorough investigation on my client's machine.

    John
    John
    A Child's Mind, Once Stretched by Imagination...
    Never Regains Its Original Dimensions

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •