home *** CD-ROM | disk | FTP | other *** search
- .se TIMEXEC 'TIMEXEC
- .se TIMEDATA 'TIMEXEC.ADM
- .se TIMERMD 'TIMEXEC.RMD
- .se PMCAL 'PMCAL
- .se DPATH 'DPATH
- .se PATH 'PATH
- :GDOC SEC = 'Internal'.
- .***********************************************
- .* *
- .* This document may be formatted with BOOKMASTER (suggested), *
- .* or with ISIL release 4. *
- .* *
- .* Appropriate BookMaster options are: *
- .* *
- .* LIB(EDFLIB10) *
- .* PROFILE(EDFPRF10) *
- .* TWOPASS *
- .* *
- .* Appropriate ISIL 4 options are: *
- .* *
- .* LIB(I40LIB) *
- .* PROFILE(I40PROF) *
- .* TWOPASS *
- .* *
- .*********************************************************************
- .*
- .*
- .* Common (PC and Host) definitions
- .* Try to get special symbols to show up in a sensible way.
- .if &E'&bslash = 0 .se bslash = \
- .if &E'&odq = 0 .se odq = '"'
- .if &E'&cdq = 0 .se cdq = '"'
- .if &E'&lbrk = 0 .se lbrk = [
- .if &E'&rbrk = 0 .se rbrk = ]
- .if &E'&lbrc = 0 .se lbrc = {
- .if &E'&rbrc = 0 .se rbrc = }
- .if &E'&emdash = 0 .se emdash = '--'
- .if &E'&hat = 0 .se hat = '^'
- .*
- .rc 1 |
- .*
- .if &$pass = 1
- .th .ty Document revision: &revdate.
- .th .ty Logical output device is &$LDEV
- .th .ty Output destination is &$OUT
- .th .ty Physical output device is &$PDEV
- .th .ty System is &$SYS
- .se prdate = '&date.
- .se day1 = 'Sunday
- .se day2 = 'Monday
- .se day3 = 'Tuesday
- .se day4 = 'Wednesday
- .se day5 = 'Thursday
- .se day6 = 'Friday
- .se day7 = 'Saturday
- .se today = &day&SYSDAYOFW
- .*
- .* Leave the following tag as is.
- :frontm.
- .* Leave the following tag as is.
- :titlep.
- .*
- .* Place the title of your document here. This tag may be repeated.
- .* If your title consists of more than one input line, repeat the tag.
- :TITLE.TIMEXEC - a facility to allow for TIMed EXECution of programs
- .*********************************************************************
- .* Repeatable Group *
- .*********************************************************************
- :AUTHOR.Ralph E. Yozzo
- :date.April 25, 1989.
- :address.
- :aline.IBM Research
- :aline.T. J. Watson Research Center
- :aline.Yorktown Heights, NY 10598
- :aline.Document formatted at &time. on &today. &prdate.
- :eaddress.
- .*********************************************************************
- .* End Repeatable Group *
- .*********************************************************************
- .*
- .* Leave the following tag as is.
- :etitlep.
- .*********************************************************************
- .* DOCUMENT ABSTRACT *
- .*********************************************************************
- .* The abstract will be placed on the title page.
- .* If you DO NOT have an abstract, delete this tag.
- :ABSTRACT.
- .* Place the contents of the abstract here, or delete if no abstract
- :p.
- This program allows one to schedule the periodic execution of
- programs.
- The format of the control file allows one to schedule events
- in a large variety of ways. For example, programs
- can be executed weekly, daily, monthly, on only certain
- days or hours. The format is described in detail in the
- TIMEXEC documentation.
-
- Such a program is useful in many applications. A few sample applications
- follow&gml.
- :ul.
- :li.backing up of a disk periodically
- :li.sending messages periodically
- :li.running diagnostics on the disk
- :li.logging statistics on usage of a resource such as
- :ul.
- :li.Local Area Networks
- :li.Host data bases
- :eul.
- :eul.
- :p.
- In addition, there is a PM front end available called
- SCHEDULE.EXE. This program creates TIMEXEC control
- files for the users.
- SCHEDULE.EXE is part of the PMCAL PACKAGE.
- .*
- .* Delete this tag if you DO NOT want a table of contents
- :TOC.
- .* Delete this tag if you DO NOT want a list of figures
- .*:FIGLIST.
- .*
- .*********************************************************************
- .* BODY OF DOCUMENT *
- .*********************************************************************
- .* Leave the following tag as is. Place the contents of your
- .* DOCUMENT after this tag
- .*
- :body.
- .* Place contents of your DOCUMENT here
- :h1.Genesis
- :p.
- This program is born from the idea that one needs to perform
- certain actions periodically. These actions involve the execution
- of programs. A computer should be capable of carrying on these recurrent
- events without manual intervention.
- :p.
- From this idea, springs forth the &TIMEXEC. program.
- :h1.Program Installation
- :h2.Placement of &TIMEXEC.
- :p.Place the &TIMEXEC. program files in a subdirectory
- that is referenced by the &PATH.
- environment variable.
- :h2.Program invocation
- :p.
- To start &TIMEXEC.
- issue the following command at an os/2 command prompt&gml.
- :xmp.
- &TIMEXEC.
- :exmp.
- :p.
- In order to end the execution of &TIMEXEC.
- press Ctrl-Break in the session in which it was started.
- :p.
- If the program was detached,
- then kill its process id.
- :h2.Killing the TIMEXEC process.
- :p.Use the following command to kill a running instance of TIMEXEC.
- :xmp.
- timexec -k
- :exmp.
-
-
- :p.To find the process id of the detached TIMEXEC process
- issue the following command
- :xmp.
- timexec -q
- :exmp.
- :p.
- This command will display the detached TIMEXEC process
- id information (i.e., provided the TIMEXEC process is running)
- :p.
- To kill the TIMEXEC process, use a utility
- such as KILL in the PROTUTIL PACKAGE and kill the
- displayed process id.
- :p.
- An sample scenario follows&gml.
- First, we shall find the TIMEXEC process id.
- For purpose of illustration, let us assume the
- TIMEXEC process id is 89.
- The command that we issue is&gml.
- :xmp.
- timexec -q
- :exmp.
- :p.
- This command displays the following information&gml.
- :xmp.
- Process id is 89.
- :exmp.
- :p.
- Then we issue the following command to kill TIMEXEC.
-
- :xmp.
- kill 89
- :exmp.
- :h2.File name convention
- :p.We look for a file called &TIMEDATA.. This file contains
- the information that is used to schedule the recurring events.
- :p.All &TIMEDATA. files along the DPATH are loaded.
- :p.The file called &TIMERMD.. is used to support
- the &PMCAL. program which is available via PCTOOLS.
- :p.
- TIMEXEC.RMD is a file that PMCAL creates.
- It is used as a communication vehicle between PMCAL and TIMEXEC.
- :p.
- PMCAL will create the TIMEXEC.RMD whenever a person has
- appointments scheduled for the current day.
- :p.
- The entries start the REMINDER program with the appropriate
- text information.
- :p.
- Therefore, the user should not have to worry about the
- TIMEXEC.RMD file. The TIMEXEC.RMD file is recreated every day
- from the PMCAL database and also it is recreated every time
- an entry is added to the database for the current day.
-
-
- :h2.Data file format
- :p.The format of the file is as shown on page :spotref refid=FORMAT0..
- :spot id=FORMAT0.
- :dl tsize=20.
- :dthd.Entry
- :ddhd.Explanation
- :dt.hour
- :dd.(0-23)
- :dt.minute
- :dd.(0-59)
- :dt.weekday of the month
- :dd.(1-5 with 1 = First ).
- This entry specifies the week in which the entry should be considered
- valid.
- We also allow the keywords
- :ul.
- :li.first
- :li.second
- :li.third
- :li.fourth
- :li.fifth
- :eul.
- :dt.day of the week
- :dd.(1-7 with 1 = Monday)
- This entry specifies the day of the week in which the entry should be considered
- valid.
- We also allow the keywords
- :ul.
- :li.monday
- :li.tueday
- :li.wednesday
- :li.thursday
- :li.friday
- :li.saturday
- :li.sunday
- :eul.
- :dt.month of the year
- :dd.(1-12)
- This entry specifies the month of the year in which the entry should be considered
- valid.
- We also allow the keywords
- :ul.
- :li.january
- :li.february
- :li.march
- :li.april
- :li.may
- :li.june
- :li.july
- :li.august
- :li.september
- :li.october
- :li.november
- :li.december
- :eul.
- :dt.day of the month
- :dd.(1-31)
- This entry specifies the day of the month in which the entry should be considered
- valid.
- :dt.year
- :dd.(1970-)
- This entry specifies the year in which the entry should be considered
- valid.
- :edl.
- :p.
- Each of these patterns may contain:
- :ul.
- :li.a number in the range above
- :li.two numbers separated by a minus meaning a range inclusive
- :li.a list of numbers separated by commas meaning any of the numbers
- :li.an asterisk meaning all legal values
- :eul.
- :h3.An example &TIMEDATA. file
- :xmp.
- ; hour minute nth_week week_day month month_day year command
- * * * Sunday,Saturday * * 1989 d:\src\shelldll\beep
- * * * * * * 1989 d:\src\shelldll\beep 100 x
- * 1,2 * * * * 1989 d:\src\shelldll\beep 200 x
- * * first friday,saturday * * 1989 d:\src\shelldll\beep 300 x
- * * * * mar,apr,may * 1989 d:\src\shelldll\beep 400 x
- 7 30 first monday october * 1989 d:\src\shelldll\beep 500 x
- 2 0 fourth sunday october * 1989 timer Fall Backward
- 2 0 first sunday april * 1989 timer Spring Forward
- :exmp.
- :p.We shall explain each entry.
-
- .sp 2
- :xmp.
- * * * Sunday,Saturday * * 1989 d:\src\shelldll\beep
- :exmp.
- :p.This entry tells us to execute the d:\src\shelldll\beep
- every minute during
- every Sunday and Saturday
- in 1989.
- .sp 2
-
- .sp 2
- :xmp.
- * * * * * * 1989 d:\src\shelldll\beep 100 x
- :exmp.
- :p.This entry tells us to execute the d:\src\shelldll\beep
- and pass the parameter "100 x",
- every minute
- in 1989.
- .sp 2
-
- .sp 2
- :xmp.
- * 1,2 * * * * 1989 d:\src\shelldll\beep 200 x
- :exmp.
- :p.This entry tells us to execute the d:\src\shelldll\beep
- and pass the parameter "200 x",
- every hour at 1 minute after the hour
- and 2 minutes after the hour
- in 1989.
- .sp 2
-
- .sp 2
- :xmp.
- * * first friday,saturday * * 1989 d:\src\shelldll\beep 300 x
- :exmp.
- :p.This entry tells us to execute the d:\src\shelldll\beep
- and pass the parameter "300 x",
- every minute
- on every first friday
- and saturday
- in 1989.
- .sp 2
-
- .sp 2
- :xmp.
- * * * * mar,apr,may * 1989 d:\src\shelldll\beep 400 x
- :exmp.
- :p.This entry tells us to execute the d:\src\shelldll\beep
- and pass the parameter "400 x",
- every minute
- in march and april and may
- in 1989.
- .sp 2
-
- .sp 2
- :xmp.
- 7 30 first monday october * 1989 d:\src\shelldll\beep 500 x
- :exmp.
- :p.This entry tells us to execute the d:\src\shelldll\beep
- and pass the parameter "500 x",
- on the first monday
- in october
- in 1989
- at 7:30am.
- .sp 2
-
- .sp 2
- :xmp.
- 2 0 fourth sunday october * * timer Fall Backward
- :exmp.
- :p.This entry tells us to set our timer back one hour
- on the fourth sunday
- in october
- at 2:00am.
- .sp 2
-
- .sp 2
- :xmp.
- 2 0 first sunday april * 1989 timer Spring Forward
- :exmp.
- :p.This entry tells us to set our timer forward one hour
- on the first sunday
- in april
- at 2:00am.
- .sp 2
-
- .* 20 Jun 1989 23:31:41 (EST)
- :h2.Execution of TIMEXEC programs
- :h3.How TIMEXEC executes programs
- :p.
- TIMEXEC should be executed in a detached session.
- :xmp.
- detach timexec
- :exmp.
- If TIMEXEC is detached then any program that TIMEXEC executes
- which sends output to the standard output device shall be lost
- unless the output is redirected to a file.
- :xmp.
- dir >log
- :exmp.
-
- :p.
- If timexec is executed in a foreground session then
- programs that are executed will display information in the
- session where TIMEXEC is running.
-
- :h2.TIMEXEC questions and answers
- :h3.Question
- :p.
- The documentation specifies the use of two files, TIMEXEC.ADM
- and TIMEXEC.RMD. Only timexec.adm was included with the package.
- What is the difference between the two? Do they have the same format ?
- PMCAL is also mentioned, is this an example? or do we need it to run
- the package ?
-
- :h3.Answer
- :p.
- The TIMEXEC.ADM file is the file that a user would edit.
- The TIMEXEC.RMD file is created by PMCAL. (It is not needed.)
- PMCAL assumes that the TIMEXEC.RMD can be deleted and
- recreated at any point. This is the reason that a person
- should not add entries to the TIMEXEC.RMD file.
-
- The format is the same for both the TIMEXEC.ADM and the TIMEXEC.RMD
- PMCAL is not needed to use TIMEXEC. However, PMCAL's "Timer Control
- Center" Menu is a nice front-end to TIMEXEC.
-
- :h2.TIMEXEC change history
- :ul.
- :li.11/08/91- TIMEXEC updated to display the name of the
- command and the parameters as it executes it.
- :eul.
-
- :backm.
- :appendix.
- .*********************************************************************
- .* END OF DOCUMENT *
- .*********************************************************************
- .* Leave the following tag as is.. This MUST be the last tag of
- .* your document.
- :egdoc.