home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
TIMEXEXE.ZIP
/
READ.ME
next >
Wrap
Text File
|
1990-03-30
|
6KB
|
185 lines
Accompanying this file is the software that goes with the "Programing
in the main()" column in the March and April 1990 issues of Personal
Workstation magazine. This code is for a program called "TIMEX" that
controls timed execution of jobs under OS/2. TIMEX consists of two
parts: a background agent (or event server), TIMEXBA; and a foreground
(user) agent, TIMEXUA.
This README file actually goes with two kits. One kit is just the
executable programs, and the other is the sources for those programs.
Ignore the parts of this file that don't apply to this particular set.
Included in the executable kit are:
READ.ME This file.
TIMEXBA.EXE Executable version of TIMEXBA, the background agent.
TIMEXUA.EXE Executable version of TIMEXUA, the foreground agent.
Included in the source kit are:
Sources for TIMEXBA:
TIMEXBA Control file for Microsoft MAKE utility
TIMEXBA.DEF Definitions file for the Microsoft linker
BA_TIMEX.H Definitions specific to TIMEXBA
BA_MAIN.C Main routine and control code
BA_MISC.C Miscellaneous support routines
BA_DB.C Routines to access the on-disk event database
BA_REQ.C Request processing
BA_EVCTL.C Event control code
BA_DATA.C Global data for TIMEXBA
Sources for TIMEXUA:
TIMEXUA Control file for the Microsoft MAKE utility
TIMEXUA.DEF Definitions file for the Microsoft linker
TIMEXUA.RC Resource file describing the user interface (for RC).
UA_TIMEX.H TIMEXUA definitions
UA_PM.H Interface (Presentation Manager) definitions
UA_BAIF.H Definitions for use with the UA_BAIF module
UA_BAIF.C Routines to interface with TIMEXBA
UA_MAIN.C Main module, entry point, control.
UA_MWIN.C Main window management
UA_EVWIN.C Event-editing dialog box management
UA_MISC.C Miscellaneous routines for TIMEXUA
UA_DATA.C Global data for TIMEXUA
General sources:
TIMEX.H Definitions for all of TIMEX
ERRHAND.H Definitions for the errhor handling module
EVPACK.H Definitions for the EVPACK module
T.C Module template file
STRING.C String manipulation
ERRHAND.C Error handling routines (from a previous column)
EVPACK.C Event packing/unpacking for buffering
MISC.C General junk
TMCLOCK.C PD utility to do date/time confersion
Junk:
SAY.C A program that echoes its imput.
----- Compilation -----
To build the executables from the sources using Microsoft tools (you
need C (I used version 5.1) and the OS/2 Software Developer's Kit), CD
to the directory containg the sources and:
MAKE TIMEXBA
MAKE TIMEXUA
You might want to turn off the warning messages about functions without
prototypes. Some of the utility routines (for example, the herror
handling stuff) were written for multiple environmenets and do not
include prototype information. I chose not to add them here because
of the problems of maintaining multiple versions of common software.
You will find, therefore, a number of warning messages about routines
without prototypes.
The result will be TIMEXUA.EXE and TIMEXBA.EXE
----- Installation -----
TIMEXBA should be run as a background process. It can be started with
a detach command from your startup.cmd script (if you have one), viz:
DETACH \TIMEX\TIMEXBA.EXE
or with a run command from your config.sys file:
RUN=\TIMEX\TIMEXBA.EXE
The use agent, TIMEXUA, can be installed into the task manager menu or
simply run out of a shell.
----- Usage notes -----
The background agent makes use of two data files: the events database
(an ASCII format file as described in the article) and a log file.
By default, the events database is C:\TIMEX\TIMEX.DB and the log
file is C:\TIMEX\TIMEX.LOG. These files don't have to exist before
you use the program, but the path (e.g., \TIMEX) does. Make sure
you create it.
You can specify different filenames with command line arguments
to the TIMEXBA program:
/LOG=filename
/DB=filename
Note that TIMEXBA journals everything into its log file. This includes
the standard output of any program that it runs. Make sure you watch
the log file so that it doesn't fill up your disk.
The event argument that you specify for a RUN action must contain an
exact path and program name. This includes the .EXE (or .COM) suffix.
Obviously, to run a batch file, use the command processor, e.g.,:
C:\OS2\CMD.EXE /C \ADMIN\MAINT.CMD
----- Interface notes -----
You will observe that in the event editing dialog there is no
default pushbutton. This is to prevent the accidental acceptance
of an event by the mere pushing of RETURN. If you want this
behaviour, change timexua.rc file so that the "Done" button is
a DefPushButton instead of a PushButton.
----- Implementation, bugs, improvements -----
This is a virgin release (I expect there to be others before I call it
an initial version), and bugs are bound to be lurking. If you report
them, I'll try to chase them down. Of course, a report with a fix
would be great!
I hope this program is useful, but I'm sure there are a lot of things
that can be done to make it better. After all, a programming project
should let you tinker. Off the top of my head:
- Different types of event actions; for instance, a NOTIFY event to
pop up a dialog window at a particular time (e.g., "GO HOME").
- A user agent command to stop the background agent. Currently there's
no easy way to get it to stop once you get it going.
- Pretty icons.
- Intelligent activation: currently the program name must be fully
specified, with path and extension. Intelligent activation would
provide a search path and default extensions, and activation of
the CMD processor for .CMD files.
- Other ways of keeping output from programs than appending to the log
file. For instance, put the output in separate output files for
each job.
If you make improvements, I'd appreciate getting them back.
-mm-
Mark E. Mallett March 30, 1990
PO Box 4188
Manchester NH 03103
usenet: mem@zinn.MV.COM
BIX: mmallett
telpath: mmallett