Can Not See Scheduler Log SchedLgU.Txt on Windows 2003

  • Hello,

    I can not see a file %SystemRoot%\Tasks\SchedLgU.Txt that is a log for Windows Scheduler on Windows 2003 Servers. I can open and print this file from Scheduled Tasks -> Advanced ->View Log. It is not visible in the Explorer. I have no problems location this file on Windows XP and Windows 2000 Servers, there it is in C:\Windows or C:\Winnt. I also can see this file on Windows 2003 machine that was upgraded from Windows 2000. But NOT on the fresh installations of 2003 servers. I do have correct settings for Folder Options with View Hidden checked and Hide protected unchecked. Here is where a  registry entry for the log are located:

    Key Name:          HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SchedulingAgent

    Value 1

      Name:            LogPath

      Type:            REG_EXPAND_SZ

      Data:            %SystemRoot%\Tasks\SchedLgU.Txt

    Any ideas why this file is not visible on 2003 boxes?

    I have to make a decision what is a better way to schedule particular jobs, through the SQL Server Agent or Windows Scheduler. I need a way to automatically monitor job completion. I have no problems doing it with Agent, I have my scripts that would query MSDB, but I would like to be able to do the same with Windows Scheduler

    Yelena

     

     

     

    Regards,Yelena Varsha

  • The file is visible through the command prompt (ie. > dir c:\windows\tasks).  Not sure how to make it visible through windows explorer but it probably has to do with the fact that is a special folder.

    I use the command utility schtasks to see if a job is scheduled and whether it is running.

    @echo Off

    SET JobName=saAdmin

    schtasks /query | find /i "%jobName%" > nul

    if errorlevel 1 GOTO NoJob

    schtasks /query | find /i "%jobName%" | find /i "Running" > nul

    if errorlevel 1 GOTO Exit

    GOTO JobRunning

    :NoJob

    ::Code to send the mail that job is not found running

    goto Exit

    :JobRunning

    ::Code to send the mail that job is running

    goto Exit

    :exit

    If you prefer scripting, you may want to look into WMI Win32_ScheduledJob. 

  • I should have mentioned. The Win32_scheduledJob object will only work with AT scheduled jobs. 

  • David, thanks!

    I like your script and will try to work with it. I will try to use schtasks. Do you know by the way where the job completion status is stored?

    I too discovered that I can reach the log through the command prompt. We also found the following:

    1. If you map a network drive to Windows 2003 server from Windows XP workstation and will try to navigate to the Task folder on the server then you will see jobs, well, local to your workstation. Our networ admin thinks that it is probably a bug. I was mapping to Admin$ on the server to a letter Q and was looking at Q\Tasks.

    2. If you don't map a drive but just open it like Run -> \\ServerName\Admin$  and then go to Tasks on the server it would show the server jobs like it should.

    Yelena

    Regards,Yelena Varsha

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply