[AccessD] Adventures with SchedLgU.Txt (Windows Scheduled Tasks - Log File) and Access 2007

Brad Marks BradM at blackforestltd.com
Mon Jan 7 13:11:02 CST 2013


All,

I do a lot of work with "report generation" applications that are built
with Access 2007.  These 
Applications are run at night in an unattended mode in a Terminal
Services environment (via the Windows Scheduler). 99% of the time
everything works nicely.  However, every once in a while a problem will
surface.  When problems occur, I often look at the SchedLgU.Txt file
which shows the results of Scheduled Tasks.

Recently, I decided to experiment with the data in the SchedLgU.Txt
file.  I wanted to pull 
the data from this file into an Access application and create a
easy-to-read report.  I thought 
that this would be a simple task.  I was wrong!

SchedLgU.Txt is a strange file!!!

When I treated SchedLgU.Txt as a linked Access table, I was not able to
see any of the data.
I spent quite a bit of time trying to understand why this would not
work.  I finally decided to 
look at alternative approaches.

I found an example of a VBS script that could read the SchedLgU.Txt file
and write
the output to a new .txt file.

I then was able to read the new .txt file with the Access application.
At this point, I was smiling.

The Access report that was generated from the new .txt file looked nice
with a header,
alternating detail line colors, a record count, and a footer.  

I moved the Access application from "Development" (Full Version of
Access) to "Production" (Only Access Runtime available). When I did
this, I started to see strange errors on the report. The report would
show a "#error" at 
the start of page 2 of the 9-page report.  I spent several hours trying
to debug this
problem but was not able to do so. (No longer smiling)

I then decided that I could live with a less fancy report and wrote a
second little script
to read the .txt file (Output from the VBS script), and create a second
.txt file that I
enhanced to have a header, footer, and record count.

The SchedLgU.Txt is a "wrap-around" file.  It has an eyecatcher that
indicates where the most
recent log record is located in the log file.  I enhanced the second
script to use this eyecatcher to 
build the output file (report) in a pure chronological order.  I also
added some white space
to make the "job groups" easier to view.

I then set up a new Scheduled Task to run these scripts at 9:00 PM every
night and e-mail
the "report" to me.

This seems to be working nicely.

The reason that I am writing this post is to see if anyone else has
every experimented
with the SchedLgU.txt file.  I also thought that others may benefit from
the experience that
I have had the past couple of days.  I have never run into a .txt file
that I could not handle with Access.  I am guessing that the
SchedLgU.Txt has a number of embedded "Strange" characters that are
causing problems.  Why there was a difference in the results between
accdb and accdr (Runtime) still remains a
mystery.

Brad  



More information about the AccessD mailing list