Dec 312017
Cron utility for OS/2 – with networking extensions. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
CRON2.DAT | 897 | 515 | deflated |
CRON2.DOC | 15145 | 4961 | deflated |
CRON2.EXE | 54928 | 26894 | deflated |
CRON2.ICO | 3192 | 280 | deflated |
CRON2.TXT | 1763 | 865 | deflated |
TCPIPDLL.DLL | 40995 | 20990 | deflated |
Download File CRON211.ZIP Here
Contents of the CRON2.DOC file
CRON/2
Client/server-based
timed program execution
version 1.1
A program by Bob Hood
Copyright (C) 1993 Bob Hood
CRON/2 is a copyrighted program. You may use CRON/2 in any environment
for any purpose. You may not sell CRON/2, nor charge a fee for CRON/2
except where a nomimal charge would be applicable for electronically
transferring CRON/2 any selected medium.
Program and documentation copyright (C) 1993 Bob Hood.
All Rights Reserved.
OS/2 and products marked (TM) are trademarks or registered trademarks
of IBM Corporation
CRON/2
---------------------------------------------------------------------------
CRON/2 is another in a series of UNIX cron clones to the OS/2 platform.
I didn't write CRON/2 to compete with any of the others; instead, I
wrote CRON/2 to give me more control over my applications than the
others. I missed the ability to specify the launching of applications
to the degree afforded me by the UNIX version. Most clones for OS/2
I've seen (and I'm sure I've not seen them all) were not as closely
modelled after the UNIX version as CRON/2. However, you can judge
for yourself.
CRON/2 adds a new (and perhaps worthless) twist in that it can be used
for networking timed launches between systems. Utilizing TCP/IP, CRON/2
can act as a client, a server, or both in the same application by
allowing CRON/2 to launch applications on remote systems at a time of
its choosing. This allows a central machine to control the running
of processes based upon factors that it alone is aware of (such as a
central file server initiating individual machine backups when network
load is minimal).
If you like CRON/2, that's fantastic! It's my first OS/2 application.
If you don't like CRON/2, that's fantastic too! Go find (or write)
another that more closely suits your needs.
I wrote CRON/2 to suit mine.
WHO CAN USE CRON/2
----------------------------------------------------------------------
Anybody. Anywhere. Anytime.
This is a FreeWare product. The first of many of my contributions
back to IBM for making its development environment easily accessable
to developers.
Thanks, Big Blue. You still have a lot of suprises left for us...
THE FUTURE
----------------------------------------------------------------------
I plan to develop a PM version of CRON/2 that supports drag-and-drop
and utilizes some container classes. Other additions will likely only
be user-interface-related: I like CRON/2's mechanics of specifying and
launching applications just the way it is.
USING CRON/2
---------------------------------------------------------------------------
As I stated previously, I wrote CRON/2 for my own needs and
edification. Because of this, you may find the documentation spartan
(and then again, you may not; what I consider "spartan" others consider
verbose). I will, however, explain enough to use the application.
STARTING CRON/2
----------------------------------------------------------------------
CRON/2 can be started with a number of command-line switches. The
syntax appears as:
CRON2 [[-n[s[0/1]]] [-s[0/1]] [-p
Each option is explained below:
-n enables networking. this option will cause CRON/2
to initialize TCP/IP for use with entries in CRON2.DAT
that specify a host name with braces ({}). Not
specifying this option when CRON2.DAT contains remote
launches, or a missing TCP/IP installation on your
machine, will cause CRON/2 to ignore those entries.
-s enables the built-in TCP/IP server. this server runs
as a separate thread within CRON/2, and is required
to allow remote CRON/2 process to launch applications
locally on your machine.
this parameter can be followed by an optional digit
in the range 0 to 1.
a value of 0 indicates that there will be no security
for launching local processes initiated remotely. Any
application that a remote CRON/2 process requests will
cause the local CRON/2 to attempt to launch it.
a value of 1 activates security on the local process.
launch requests made by remote processes MUST appear
identically in the local process's CRON2.DAT file, or
the launch request will not be serviced.
as illustrated, this parameter can be attached to the
"-n" option to enable both client and server portions
of CRON/2 in the same process using separate threads.
-p specifies the TCP/IP port to use for initializing
sockets. this value defaults to port 10000 if not
specified.
-l activates activity logging. A "-l" alone will default to
"CRON2.LOG" in the same directory as CRON2.DAT. You may
also specify an alternative filename (and path) to
capture output.
DIRECTING CRON/2: THE CRON2.DAT FILE
----------------------------------------------------------------------
Unlike UNIX, CRON/2 uses a single command file for specifying
applications and launch times. This file is called CRON2.DAT, and
MUST reside in the directory where the CRON/2 executable is started
from. A sample CRON2.DAT file is provided in the distribution with
sample entries commented out.
With few execptions, the CRON2.DAT file appears and behaves identically
to any UNIX cron files you may have worked with before:
o Comments are denoted by a pound sign (#) in column one
o Command entries appear one to a line
o A virtually-unlimited number of entries may appear
o Each entry contains the usual cron fields:
o minute
o hour
o day
o month
o day of the week
o executable file and options
Beyond these items, the CRON2.DAT file contains some OS/2-specific
entries necessary for controlling the types and appearance of
applications when they are launched. Four additional fields appear
in each application record:
o Application type: "VDM", "OS2", or "PM"
o Process priority: "FG" for foreground, "BG" for background)
o Appearance of application: "WIND" for windowed, "FULL" for
full screen
The fourth field, not highlighted above, is optional, and preceeds
the path/executable entry in the CRON2.DAT file. This field is
denoted by braces ({}), and specifies the name of a remote system
on which this application should be launched.
Addtionally, each appearance token (WIND or FULL) may be followed by
a minus sign (-) to indicate that the application should be started
as a minimized icon.
The following are example CRON/2 entries that I use to control my
USENET news feed from OS/2:
0 1 * * * VDM BG WIND c:\usenet\snews\expire.bat
25,55 * * * * VDM BG WIND c:\usenet\snews\sendbtch.bat
0,30 * * * * OS2 BG FULL- c:\uucp_os2.cmd
For those of you unfamiliar with cron, the first entry launches the
MS-DOS batch file "expire.bat" in the "c:\usenet\snews" directory
at 1:00 am each day. It runs in a Virtual DOS Machine session, in the
background, in a PM window.
The second entry is different only in that it runs the MS-DOS batch
file at 25 and 55 after *each* hour.
The third entry operates on an OS/2-specific command file. This
command file is initiated at the top of, and half past, each hour.
It is run in an OS/2 text session, in the background, in a full-screen
window that has is minimized to a Presentation Manager icon as soon
as it starts.
You can specify multiple entries for minute, day, hour, month, and
day-of-the-week by separating them with commas.
You can find addtional information about cron by consulting a UNIX
manual or man page.
DYNAMIC SYNCHRONIZING
----------------------------------------------------------------------
To avoid having to stop and re-start CRON/2 when changes are made to
CRON2.DAT, CRON/2 will check CRON2.DAT at half-past each minute to see
if it has been changed since CRON/2 was started (or since the last
time it processed CRON2.DAT).
If the file size or date/time stamp has changed, CRON/2 will release
it's internal list of processes, and create a new list with the
altered contents of CRON2.DAT.
DIRECTING ANOTHER CRON/2: REMOTE TIMED LAUCHING
----------------------------------------------------------------------
CRON/2 has the ability to launch applications on other
TCP/IP-networked OS/2 systems running another CRON/2 process with its
TCP/IP server activated.
To utilize this feature, you must have acquired and sucessfully
installed IBM's TCP/IP 1.2 (TM) product on each system that you plan
to run the CRON/2 server on.
You specify this unique cron feature in two ways: first, you must
activate CRON/2's TCP/IP support when it is started by one or a
combination of the -n or -s command-line paramaters; second, you
can optionally select entries in CRON2.DAT to launch on remote systems
by prefixing the executable name with the name of the remote system.
Here is an example entry:
11,38,42,59 * * * * PM FG FULL {bhlocal1}c:\os2\apps\jigsaw.exe
This entry in CRON2.DAT will launch the OS/2 PM Jigsaw application
in a full-screen Presentation Manager window as the foreground
application at 11, 38, 42, and 59 minutes after each hour.
The difference in this entry is that it doesn't launch on the local
machine, but on the remote machine named "bhlocal1". If you use
domain names to specify remote machines, the domain name must reside
in your TCPIP\ETC\hosts file. You may also elect to specify remote
hosts in dotted-decimal format to avoid domain name resolving (i.e.,
{192.100.100.2} instead of {bhlocal1}).
Needless to say, the application (and path) you specify for the remote
machine should actually exist.
If security has been activated on the remote machine (i.e., -s1 or
-ns1), with the exception of the time/date/dow information, the
application entry fields in the local CRON2.DAT file must match
EXACTLY with those contained in the remote machine's CRON2.DAT file
for the application to be successfully launched remotely.
The following examples illustrate a local and remote CRON2.DAT entry.
Each entry will fail remote execution (note that time/date/dow
information is not illustrated because is has no impact):
PM FG FULL {bhlocal1}c:\os2\apps\jigsaw.exe
PM BG FULL {bhlocal1}c:\os2\apps\jigsaw.exe
--
PM FG FULL {bhlocal1}c:\os2\apps\jigsaw.exe
PM FG FULL- {bhlocal1}c:\os2\apps\jigsaw.exe
-----
PM FG FULL {bhlocal1}c:\os2\apps\jigsaw.exe
PM FG FULL {bhlocal1}c:\os2\apps\jigsaw
----------
However, the next two entries WILL successfully compare because
options are not taken into consideration (note that the illustrated
options to Jigsaw are bogus):
PM FG FULL {bhlocal1}c:\os2\apps\jigsaw.exe
PM FG FULL {bhlocal1}c:\os2\apps\jigsaw.exe -3 -new
Formatting of fields is not important, so spaces and tabs between fields
in the CRON2.DAT will not be taken into consideration when security
is active.
GOTCHAS (non-bugs)
---------------------------------------------------------------------------
o CRON/2 will barf if you specify either -ns1 or -s1 and there is
no local CRON2.DAT file...
o Starting CRON/2 with an empty CRON2.DAT file will generate a
richly-deserved insult about your questionalble parentage...
o System error messages detected by CRON/2 are displayed as decimal
only
o If you are running any .CMD files from CRON2.DAT, you MUST have
COMSPEC set in your OS/2 environment (this is usually automatic)
o You can't fool OS/2 into running a minimized process as the
foreground process...it knows you're only human...
WHAT THE ... ?! (known bugs)
---------------------------------------------------------------------------
o Starting applications with the FG token, either locally or remotely,
will occasionally generate a 457 (ERROR_SMG_START_IN_BACKGROUND)
error...I don't know why yet...
o CRON/2 was developed using a beta compiler on a beta platform...
so there...
YOU KNOW, IT'S FUNNY...
---------------------------------------------------------------------------
It took me longer to come up with an icon for the damn thing than it
did to write it all...
BUG REPORTS, QUESTIONS, COMMENTS, ATTA-BOYS...
---------------------------------------------------------------------------
Bob Hood
Mailnet :1217 S. Independence Street
Lakewood, CO 80232
Internet :[email protected] <--- preferred!!
AT&Tnet :(303) 980-8392
December 31, 2017
Add comments