Why would a scheduled task stop working?

Discussion in 'Windows Server' started by childofthe1980s, Aug 10, 2009.

  1. Hello:

    Several weeks ago, I developed a .cmd file that runs a macro (.mac file).
    It runs perfectly. Then, I created a task through Windows Server 2003 Task
    Scheduler that runs this .cmd. and therefore the macro, automatically. The
    task works perfectly, when I right-click on the task and choose "Run".

    And, for three weeks, Task Scheduler ran this .cmd file automatically.
    Then, a few days ago, it stopped running the .cmd file at its scheduled time.
    Again, if I right-click on it and choose "Run", it does run.

    But, why would the Windows Task Scheduler all of a sudden stop running this
    ..cmd file automatically?

    I have done everything that I know to do to troubleshoot this. I have
    rebooted the server, I have stopped and started the service for Task
    Scheduler, I have run the .cmd file manually, etc., etc.

    Any ideas?

    childofthe1980s
     
    childofthe1980s, Aug 10, 2009
    #1
    1. Advertisements

  2. childofthe1980s

    Dave Patrick Guest

    Scheduled Tasks|Advanced|View Log may provide some details. If the job
    connects to another machine you may need to add the user/ group 'logon as
    batch job' rights (server side). Control Panel|Admin Tools|Local Security
    Policy\Local Policies\User Rights Assignments
    "Log on as a batch job"

    If the task completes but the job does not then there is a problem in the
    job itself. Remember that if it involves network resources to make sure the
    user account has permissions to the resources and also use UNC paths as
    mapped drives won't natively exist when no one is logged on.


    --

    Regards,

    Dave Patrick ....Please no email replies - reply in newsgroup.
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    http://www.microsoft.com/protect
     
    Dave Patrick, Aug 10, 2009
    #2
    1. Advertisements

  3. No, it's all on the same machine. And, the admin runs the task. There's no
    UNC pathing either.

    Also, my .cmd file runs if I run the task manually. Why would scheduling be
    any different.

    Could this be a service pack issue?

    I just don't understand why it all of a sudden stopped working. Nothing has
    changed that I'm aware of.

    childofthe1980s

     
    childofthe1980s, Aug 10, 2009
    #3
  4. childofthe1980s

    Dave Patrick Guest

    We've no idea either. You'll have to start by checking the log and work from
    there.


    --

    Regards,

    Dave Patrick ....Please no email replies - reply in newsgroup.
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    http://www.microsoft.com/protect
     
    Dave Patrick, Aug 10, 2009
    #4
  5. At this stage chances are that the problem is caused by the job you're
    running, not by some OS or Service Pack issue. Maybe it runs and you're not
    aware that it does. Let's have a look at the script you're running!


     
    Pegasus [MVP], Aug 10, 2009
    #5
  6. The job definitely is not running. It dumps a report to a folder. That
    report stopped appearing last week.

    More specifically, the job starts but does not finish.

    The log is not saying anything as to why. No Microsoft log is forthcoming
    with information on any platform (Windows, SQL, Sharepoint, etc.)

     
    childofthe1980s, Aug 10, 2009
    #6
  7. The log is not saying anything as to why. No Microsoft log is forthcoming on
    any platform (Windows, SQL, Sharepoint, etc.)

     
    childofthe1980s, Aug 10, 2009
    #7
  8. Again, the task works if I run it manually. Why should scheduling be any
    different? And, it was working up until a few days ago and no changes were
    made on the network.


     
    childofthe1980s, Aug 10, 2009
    #8
  9. I have dealt with many posts in which the OP thought that a scheduled job
    failed to run but it did, in fact, run. I would have a tidy sum by now if I
    had received one Dollar for each of these posts. This is why the starting
    point is always: Let's have a look at your job! Without this we have to
    guess, and guessing is usually a waste of time in the trouble-shooting
    business.
     
    Pegasus [MVP], Aug 10, 2009
    #9
  10. The password has not changed.

    Below is the log. There's nothing forthcoming but, again, here it is:

    "Task Scheduler Service"
    Exited at 8/9/2009 5:44:17 PM
    "Task Scheduler Service"
    Started at 8/9/2009 5:44:22 PM
    "Task Scheduler Service"
    5.2.3790.3959 (srv03_sp2_rtm.070216-1710)
    "UNIV.job" (UNIV.cmd)
    Started 8/9/2009 5:44:39 PM
    "UNIV.job" (UNIV.cmd)
    Finished 8/9/2009 5:45:04 PM
    Result: The task completed with an exit code of (0).
    "UNIV.job" (UNIV.cmd)
    Started 8/9/2009 5:52:25 PM
    "UNIV.job" (UNIV.cmd)
    Finished 8/9/2009 6:55:11 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/9/2009 7:00:00 PM
    "CSI.job" (CSI.cmd) 8/9/2009 7:57:11 PM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "CSI.job" (CSI.cmd)
    Started 8/9/2009 7:58:32 PM
    "CSI.job" (CSI.cmd)
    Finished 8/9/2009 8:40:30 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/9/2009 8:55:00 PM
    "CSI.job" (CSI.cmd) 8/9/2009 10:03:22 PM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 8/9/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 8/9/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 8/9/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 8/9/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 8/9/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 8/9/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/10/2009 1:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Started 8/10/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/10/2009 3:00:00 AM
    "CSI.job" (CSI.cmd) 8/10/2009 8:30:19 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "PAPER.job" (PAPER.cmd) 8/10/2009 8:30:25 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "UNIV.job" (UNIV.cmd) 8/10/2009 8:30:28 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    [ ***** Most recent entry is above this line ***** ]



    "PAPER.job" (PAPER.cmd)
    Finished 7/30/2009 4:48:44 AM
    Result: The task completed with an exit code of (0).
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 7/30/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 7/30/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 7/30/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 7/30/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 7/30/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 7/30/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 7/31/2009 1:00:00 AM
    "CSI.job" (CSI.cmd)
    Finished 7/31/2009 1:53:25 AM
    Result: The task completed with an exit code of (0).
    "UNIV.job" (UNIV.cmd)
    Started 7/31/2009 2:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Finished 7/31/2009 2:25:56 AM
    Result: The task completed with an exit code of (c000013a).
    "PAPER.job" (PAPER.cmd)
    Started 7/31/2009 3:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Finished 7/31/2009 4:47:05 AM
    Result: The task completed with an exit code of (0).
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 7/31/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 7/31/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 7/31/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 7/31/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 7/31/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 7/31/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/1/2009 1:00:00 AM
    "CSI.job" (CSI.cmd)
    Finished 8/1/2009 1:55:23 AM
    Result: The task completed with an exit code of (0).
    "UNIV.job" (UNIV.cmd)
    Started 8/1/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/1/2009 3:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Finished 8/1/2009 3:01:34 AM
    Result: The task completed with an exit code of (0).
    "PAPER.job" (PAPER.cmd)
    Finished 8/1/2009 4:50:12 AM
    Result: The task completed with an exit code of (0).
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 8/1/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 8/1/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 8/1/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 8/1/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 8/1/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 8/1/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/2/2009 1:00:00 AM
    "CSI.job" (CSI.cmd)
    Finished 8/2/2009 1:42:40 AM
    Result: The task completed with an exit code of (0).
    "UNIV.job" (UNIV.cmd)
    Started 8/2/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/2/2009 3:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Finished 8/2/2009 3:06:49 AM
    Result: The task completed with an exit code of (0).
    "PAPER.job" (PAPER.cmd)
    Finished 8/2/2009 5:00:06 AM
    Result: The task completed with an exit code of (0).
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 8/2/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 8/2/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 8/2/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 8/2/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 8/2/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 8/2/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/3/2009 1:00:00 AM
    "CSI.job" (CSI.cmd)
    Finished 8/3/2009 1:42:57 AM
    Result: The task completed with an exit code of (0).
    "UNIV.job" (UNIV.cmd)
    Started 8/3/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/3/2009 3:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Finished 8/3/2009 3:01:40 AM
    Result: The task completed with an exit code of (0).
    "PAPER.job" (PAPER.cmd)
    Finished 8/3/2009 4:47:14 AM
    Result: The task completed with an exit code of (0).
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 8/3/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 8/3/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 8/3/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 8/3/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 8/3/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 8/3/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/4/2009 1:00:00 AM
    "CSI.job" (CSI.cmd)
    Finished 8/4/2009 1:55:28 AM
    Result: The task completed with an exit code of (0).
    "UNIV.job" (UNIV.cmd)
    Started 8/4/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/4/2009 3:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Finished 8/4/2009 3:01:06 AM
    Result: The task completed with an exit code of (0).
    "PAPER.job" (PAPER.cmd)
    Finished 8/4/2009 4:50:58 AM
    Result: The task completed with an exit code of (0).
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 8/4/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 8/4/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 8/4/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 8/4/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 8/4/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 8/4/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/5/2009 1:00:00 AM
    "CSI.job" (CSI.cmd)
    Finished 8/5/2009 1:55:07 AM
    Result: The task completed with an exit code of (0).
    "UNIV.job" (UNIV.cmd)
    Started 8/5/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/5/2009 3:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Finished 8/5/2009 3:01:34 AM
    Result: The task completed with an exit code of (0).
    "PAPER.job" (PAPER.cmd)
    Finished 8/5/2009 4:48:40 AM
    Result: The task completed with an exit code of (0).
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 8/5/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 8/5/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 8/5/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 8/5/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 8/5/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 8/5/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/6/2009 1:00:00 AM
    "CSI.job" (CSI.cmd)
    Finished 8/6/2009 1:54:10 AM
    Result: The task completed with an exit code of (0).
    "UNIV.job" (UNIV.cmd)
    Started 8/6/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/6/2009 3:00:00 AM
    "PAPER.job" (PAPER.cmd) 8/6/2009 2:33:46 PM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "UNIV.job" (UNIV.cmd) 8/6/2009 2:33:49 PM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "Task Scheduler Service"
    Exited at 8/6/2009 8:48:12 PM
    "Task Scheduler Service"
    Started at 8/6/2009 8:49:58 PM
    "Task Scheduler Service"
    5.2.3790.3959 (srv03_sp2_rtm.070216-1710)
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 8/6/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 8/6/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 8/6/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 8/6/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 8/6/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 8/6/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/7/2009 1:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Started 8/7/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/7/2009 3:00:00 AM
    "CSI.job" (CSI.cmd) 8/7/2009 8:20:20 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "PAPER.job" (PAPER.cmd) 8/7/2009 8:20:23 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "UNIV.job" (UNIV.cmd) 8/7/2009 8:20:25 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 8/7/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 8/7/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 8/7/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 8/7/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 8/7/2009 11:30:07 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 8/7/2009 11:30:07 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/8/2009 1:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Started 8/8/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/8/2009 3:00:00 AM
    "CSI.job" (CSI.cmd) 8/8/2009 8:49:39 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "PAPER.job" (PAPER.cmd) 8/8/2009 8:49:42 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "UNIV.job" (UNIV.cmd) 8/8/2009 8:49:45 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "Task Scheduler Service"
    Exited at 8/8/2009 8:50:12 AM
    "Task Scheduler Service"
    Started at 8/8/2009 8:51:48 AM
    "Task Scheduler Service"
    5.2.3790.3959 (srv03_sp2_rtm.070216-1710)
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Started 8/8/2009 10:50:00 PM
    "CSIDeleteReport.job" (CSIDeleteReport.bat)
    Finished 8/8/2009 10:50:00 PM
    Result: The task completed with an exit code of (0).
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Started 8/8/2009 11:00:00 PM
    "UNIVDeleteReport.job" (UNIVDeleteReport.bat)
    Finished 8/8/2009 11:00:00 PM
    Result: The task completed with an exit code of (0).
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Started 8/8/2009 11:30:00 PM
    "PAPERDeleteReport.job" (PAPERDeleteReport.bat)
    Finished 8/8/2009 11:30:00 PM
    Result: The task completed with an exit code of (0).
    "CSI.job" (CSI.cmd)
    Started 8/9/2009 1:00:00 AM
    "UNIV.job" (UNIV.cmd)
    Started 8/9/2009 2:00:00 AM
    "PAPER.job" (PAPER.cmd)
    Started 8/9/2009 3:00:00 AM
    "CSI.job" (CSI.cmd) 8/9/2009 10:18:17 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "PAPER.job" (PAPER.cmd) 8/9/2009 10:18:21 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "UNIV.job" (UNIV.cmd) 8/9/2009 10:18:25 AM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).
    "CSI.job" (CSI.cmd)
    Started 8/9/2009 10:29:34 AM
    "CSI.job" (CSI.cmd)
    Finished 8/9/2009 11:13:06 AM
    Result: The task completed with an exit code of (0).
    "UNIV.job" (UNIV.cmd)
    Started 8/9/2009 3:00:00 PM
    "UNIV.job" (UNIV.cmd) 8/9/2009 5:42:44 PM ** WARNING **
    The task was terminated. This action was initiated either by an
    administrator or by the Task Scheduler service (because, for example, the
    computer is now non idle).


     
    childofthe1980s, Aug 10, 2009
    #10
  11. Trust me. Here is what the problem is. The task is starting to run, but the
    processes it is designed to run (the macro) are not finishing. Again, a
    report is created showing the processes that run. That report does not
    appear, as it once did.

    You see, the macro logs in a Dynamics GP user ID into GP and runs accounting
    file maintenance. Takes about an hour.

    The job runs perfectly, when I run it manually. It does not finish, when I
    have it run automatically. It did work perfectly, for about three weeks.

    Below is the script. But, unless you are a GP consultant, you will not be
    able to make heads or tails of it. The issue is with Task Scheduler--not GP!
    There is indeed an issue with the dumb thing no longer automating my .cmd
    file. It has got to be a service pack issue or something along those lines:

    "D:\Program Files\Microsoft Dynamics\GP$DYNGP\Dynamics.exe" "D:\Program
    Files\Microsoft Dynamics\GP$DYNGP\Dynamics.set" "D:\GP Macros\GP
    Login_CSI.mac"
     
    childofthe1980s, Aug 10, 2009
    #11
  12. Which is your job? What time is it scheduled for? Is it not showing in
    the task log at all (from what you give below) ?
    Have you got any code breaks in the .cmd file?

    You say that the job starts, but never ends... well in that case
    Scheduled Tasks is doing something right (starting the job..), in which
    case putting some code breaks in your .cmd file might help see where it
    gets to. I tend do like the following:

    echo starting job >> %TEMP%\log
    set >> %TEMP%\log
    *CMD1*
    echo CMD1 error: %ERRORLEVEL% >> %TEMP%\log
    *CMD2*
    echo CMD2 error: %ERRORLEVEL% >> %TEMP%\log
    echo stopping job >> %TEMP%\log

    That way as the job runs, you'll see how it progresses along, and where
    the script fails.

    Its probably some environment variable from the user profile, thats
    different from when you are physically logged in, to when the task
    scheduler automatically runs the job.

    try also adding a "set >> %TEMP%\log" at the beginning of your script
    to detect those differences.

    Adrian
     
    Adrian Marsh (NNTP), Aug 10, 2009
    #12
  13. But, why would the job work automatically for three weeks and then stop?

    childofthe1980s

     
    childofthe1980s, Aug 10, 2009
    #13
  14. No idea, but often network environments are too complex to be able to
    predict like that, and assume that *nothings changed*, even small ones.
    Somehow, something - somewhere has changed. Only option is to diagnose
    it, hence the logs and the break points - and - answers to questions
    asked here in the newsgroup?? lol (which job in the list? what time?)

    So - is the job in that list? what happens in your breakpoints, etc,
    etc. Is there anything in the SYSTEM event log, or APPLICATION event
    logs ? Are there other errors in there possibly related (domain
    issues/dns issues - anything!).
     
    Adrian Marsh (NNTP), Aug 10, 2009
    #14
  15. *** See below.

    *** The word "trust" does not exist in my vocabulary
    *** when it comes to trouble-shooting.
    *** And here you see why I do not use the word "trust". In your
    *** original post you wrote (and I quote): "it stopped running the
    *** .cmd file at its scheduled time". We now know that it did NOT
    *** stop running the job but that the job did not finish. Trust?
    *** I am not a GP consultant but I can see several potential reasons
    *** why the job might not finish. Blaming a service pack at this stage
    *** is premature and could cause you to miss the real issue.
    *** I now recommend the following:
    1. Put the above line into a batch file and modify it like so:
    @echo off
    echo %date% %time% %UserName% >> c:\test.txt
    net use 1>>c:\test.txt 2>>&1
    "D:\Program Files\Microsoft Dynamics\GP$DYNGP\Dynamics.exe" "D:\Program
    Files\Microsoft Dynamics\GP$DYNGP\Dynamics.set" "D:\GP Macros\GP
    Login_CSI.mac" 1>>c:\test.txt 2>>&1
    echo %date% %time% End of job >> c:\test.txt

    2. Log on under the *same* account as the one you use for the
    scheduled task.

    3. Invoke the above batch file via the Task Scheduler, then watch
    what happens.

    4. Examine the file c:\test.txt.
     
    Pegasus [MVP], Aug 10, 2009
    #15
  16. I have asked our network guys if they changed anything. I'm awaiting their
    response.

    Likely, I'm just going to move these macros to a box where there is little
    or no change. I know--dare to dream.

    Those log files are useless to review. Break points don't help here, as the
    issue occurs when logged off and at 1 - 3 AM.

     
    childofthe1980s, Aug 10, 2009
    #16
  17. I beg to differ, ok, but "logpoints" will still tell you how far your
    code gets, which is still useful to know.

    And yet.. still.. you've not told us the job name in those logs to go
    looking at...

     
    Adrian Marsh (NNTP), Aug 10, 2009
    #17
  18. OK, Adrian! There are three jobs. So, every job that is in that stupid log
    is a separate job that is in question. Each of them is experiencing the same
    issue.

    As I tried to indicate, you can disregard. No need for sarcasm, either.



     
    childofthe1980s, Aug 10, 2009
    #18
  19. childofthe1980s

    Monitor Guest

    This is a strange thread. It started by you posting your problem and having
    some preconceived ideas about its cause, based on no evidence whatsoever.
    Respondents had to ask you repeatedly to supply full details. You asked
    respondents to trust your technical expertise when at the same time posting
    contradictory reports (the job didn't start / the job did start but it did
    not finish).

    Perhaps a small amount of sarcasm would be appropriate, mixed with a
    recommendation to review your trouble shooting approach. Keep an open mind,
    do not jump to conclusions and do not assume anything unless you are
    completely sure of your facts.
     
    Monitor, Aug 10, 2009
    #19
  20. childofthe1980s

    Dave Patrick Guest

    There should be an entry either case success or failure for every task that
    runs.


    --

    Regards,

    Dave Patrick ....Please no email replies - reply in newsgroup.
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    http://www.microsoft.com/protect
     
    Dave Patrick, Aug 11, 2009
    #20
    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.