Copyright: This program is provided free as is with no warranty whatsoever
What it does:
CRON is a simple program launcher. Once every 60 seconds it will compare the current system time to events in the CRONTAB database. If an event time matches the current time, it will run. 4 digit years are used to allow the program to be Y2K compliant.
Requirements:
CRON by itself requires OS/2 with REXX and DrDialog (Available free from IBM at http://service2.boulder.ibm.com/devcon/) be installed. Part of this package (DRREXX.EXE) is included in case you don't want to download the full package. The program was tested using OS/2 version 4 with Object REXX. It should however, work equally well with plain REXX and earlier versions of OS/2.
To fully use the program however, it is recommended you also have multimedia installed on your system.
The add in module (MSGBOX.RES) requires both multimedia and DrDialog to be fully functional. MSGBOX.CMD is used to display a reminder box and optionally play a WAV file.
Usage:
Type CRON at a command line
NOTE: This file (CRON.CMD) is not compatible with the previous CRONTAB database file. Use CONVERT.CMD to reformat your database if needed.
Usage options:
Starting the program as "CRON 1>OUT.LOG 2>ERR.LOG" will create two log files for storing program output and errors respectively. No other options are available.
Event Database:
A sample crontab file is supplied. This file stores the events that CRON will run and is called CRONTAB. This file MUST be in the same directory as the CRON.CMD file. It is a standard ascii file and the data layout is as follows:
minutes ≡ hours ≡ dates ≡ months ≡ days ≡ Years ≡ session type ≡ program type ≡ file name (wav or executable) ≡ parameters or message ≡ close on exit
Permissable data is as follows:
Minutes - Must be a number. Can be entered as discrete numbers (1,2,3) or a range (1-3)
Hours - Can be entered as discrete numbers (1,2,3) or a range (1-3) or a wildcard (*)
Dates - Can be entered as discrete numbers (1,2,3) or a range (1-3) or a wildcard (*)
Months - Can be entered as discrete numbers (1,2,3) or a range (1-3) or a wildcard (*)
Days (Day of the week) - Can be entered as discrete numbers (1,2,3) or a range (1-3) or a wildcard (*) Days are 1 for Sunday ... 7 For Saturday
Years - Can be entered as discrete numbers (1996,1997) or a range (2001-2002) or a wildcard (*). Years are entered as a 4 digit year for Y2K compliance.
Session Type - Is case sensitve and entered as follows:
Minimized (To start as 'start * /min')
Detached (To start as 'detach')
Full Screen (To start as 'start * /fs')
Window (To start as 'start * /win')
Default (To start as 'start *')
* - A /c option will be added here if "Close on exit" is set to "Yes".
Program type - Case Sensitive as follows:
Program (an executable program)
Message (a message box)
File name - an executable file name or a wav file to be played
Close on exit - Case sensitive as follows:
Yes (Closes after program execution)
No (Does not close after program execution)
NOTE - The following are special characters:
≡ (ALT+240) - Element seperator
Installation:
Unzip the file into a directory - That's it !! Or, if you would like the program objects created for you, type 'install' at the command line.
Additional programs:
CRONTAB.CMD
This file is no longer included. Originally, MSGBOX.CMD and CRONTAB.CMD were written using the freeware VREXX utilities from IBM. This set of utilities caused numerous SYS3175 errors that could not be corrected by me.
CRONTAB.RES
This is a resource file that provides a GUI interface for maintaining the CRONTAB database file. If you have a resource compiler, you may compile this into a stand-alone executable. To execute this via a command line type: DRREXX CRONTAB.RES
To set up a program object for this use the following parameters:
Command line: x:\directory\DRREXX.EXE
Parameters: x:\directory\crontab.res
Working directory: x2:\directory2
Where:
x is the drive holding DRREXX.EXE
directory is the full path to DRREXX.EXE
x2 is the drive holding your CRONTAB file
directory2 is the full path to your CRONTAB file
It will look in the current working directory for the CRONTAB file. If it does not exist, it will create it. The data entered must adhere to the event database values as listed above.
The function buttons perform the following actions:
Browse - brings up a File Open dialog to select a wav file or program
<< - Displays the previous record
>> - Displays the next record
Add - Adds the currently displayed record as a new record
Delete - Deletes the currently displayed record and displays record # 1
Quit - Ends the program
Update - Updates the currently displayed record.
NOTE: Changes made to the displayed record are not updated unless this button is clicked !!
NEXT and PREVIOUS will discard any pending changes.
Test - Runs the currently displayed program immediately. This function will not update, add or delete anything.
(Duplicate menu options are also provided for these functions.)
MSGBOX.CMD
This file is no longer included. It's function was incorporated directly into CRON.CMD and MSGBOX.RES.
MSGBOX.RES
This is the MSGBOX resource file. If you have a resource compiler, you may compile this into a stand-alone executable. It may also be run as-is using the DRREXX.EXE program.
Although not intended, this file may be invoked alone as:
INSTALL.CMD - Creates the Crontab folder and associated program objects.
CRONTAB - This is the database for your events
DRREXX.EXE - The resource runtime module from the DrDialog utilities.
CONVERT.CMD - This is a simple utility to convert the previous version of the CRONTAB file to the new format. To invoke type: CONVERT data_file at the command prompt.
It will do the following:
Convert the old delimiter (/) to the new one (≡)
Break down your old command line to find out the working directory
Set the 'Close on exit' string to 'Yes'
Set the 'Program type' string
Save the converted file to a file called NEWDATA
If everything went as planned you may rename this file to CRONTAB to use it with the new CRON.CMD and CRONTAB.RES files.
Known problems:
None
History:
1. Added another field to the CRONTAB file to specify the session type.
2. Changed MSGBOX to use DrDialog rather than VREXX.
3. Changed the field delimiter to ≡
4. Added another field to the CRONTAB file to optionally leave the session open.
5. Added a wait state to CRONTAB.RES and CRON.CMD to avoid file contention problems.
6. Changed CRON.CMD so that it no longer requires wrapper files to launch a program or message box.
7. Moved the MSGBOX.CMD functionality into MSGBOX.RES and CRON.CMD.