Scheduled *.bat file won't execute Windows Server 2003

Discussion in 'Windows Server' started by Jeff C, Aug 30, 2008.

  1. Jeff C

    Jeff C Guest

    Using a program "Docuanalyzer" to process reports with it's command line
    syntax in a .bat file.

    "full path to analyzer.exe" "full path to report file" "full path to report
    model file" "full path and name of output file"

    I have dozens of these files executing using the Windows Task Scheduler in
    XP Pro and am now setting up a new machine with Windows Server 2003.

    The scheduled batch file runs but does not execute. Anyone have a suggestion?

    Thanks in advance.
     
    Jeff C, Aug 30, 2008
    #1
    1. Advertisements

  2. If I had received one Dollar for every post whose author claimed that his
    scheduled batch file did not run, I'd be a wealthy man by now . . . The
    usual methods in these situations are:
    1. Post the batch file here.
    2. Give yourself some eyes so that you can see what's
    going on, e.g. like so:
    @echo off
    echo %date% %time% %UserName% %path% >> c:\test.txt
    "c:\SomeFolder\YourApp.exe" 1>>c:\test.txt 2>>&1
    echo %time% End of batch file >> c:\test.txt

    I suspect that c:\test.txt will reveal the nature of your problem.
     
    Pegasus \(MVP\), Aug 30, 2008
    #2
    1. Advertisements

  3. Jeff C

    Jeff C Guest

    Thanks Pegasus - you are correct and I apologize for my redundancy - I'll try
    your suggestion and also going to try UNC Naming since I am calling files
    from other mapped drives.

    First shot out of the gate though - moving a working group of scheduled
    files from XP Pro to Windows Server 2003 and then they don't work gave rise
    to the question.

    I'll post back what I find out. Thanks again
     
    Jeff C, Aug 30, 2008
    #3
  4. Thanks for the feedback. I'm not sure what you mean with "moving a working
    group of scheduled files from XP Pro to Windows Server 2003". If you're
    moving the .job files then you will have to re-enter your credentials for
    each of them before they will work.
     
    Pegasus \(MVP\), Aug 30, 2008
    #4
  5. Jeff C

    Jeff C Guest

    --
    Jeff C
    Live Well .. Be Happy In All You Do


    I use a number of different scheduled or spooled report sources for example:

    Report from system A drops daily to a text file at 4 AM- report from system
    B drops daily to an Excel file at 5 AM, Scheduled batch file processes report
    from system A. I use both reports as "linked" data sources in an Access
    database. I use Windows Task Scheduler to schedule Docuanalyzer to process
    the text file daily with a batch file after it drops and then I run an access
    command line firing a macro that runs queries and appends the data to a table
    every day.

    This is what I meant by a working group of scheduled files.

    I edited the batch file replacing the mapped drive letters with UNC names of
    the machines and the scheduled file runs now so that was the problem.

    I could use a suggestion though on the best method to run scheduled tasks in
    Windows Server 2003. Should I just continue to use the task scheduler or is
    there a better, preferred method? Can you turn a scheduled task into a
    Service? How?

    The Scheduled tasks are all batch files similar to the one described above
    or VBS files generally naming, copying, and/or moving excel spreadsheets.

    Thanks for your help.
     
    Jeff C, Aug 30, 2008
    #5
  6. Services are meant to run more or less all of the time. Scheduled tasks are
    supposed to run at certain times, as invoked by the Task Scheduler (which,
    in fact, is a service!). You should continue invoking batch files or script
    files with the Task Scheduler.
     
    Pegasus \(MVP\), Aug 30, 2008
    #6
  7. Trying to access network drives via a scheduled task almost always fail
    since the task is run while no one is logged on and the network drive
    isn't assigned.

    Always us UNC names for network/shared drives....

    --

    Regards,
    Hank Arnold
    Microsoft MVP
    Windows Server - Directory Services
     
    Hank Arnold (MVP), Aug 31, 2008
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.