WindowsCRON Index
WindowsCRON 	Contents

Overview

Installation

Menu options

Options

Adding tasks

Meta tasks

Release notes

Information


Overview

WindowsCRON (like the Unix utility from which its name comes) provides the facilities for Windows to execute tasks at specified times or intervals. The interface, however, is a bit more friendly than that of the Unix version.

Tasks may be added and edited using the visual, check-all-that-apply approach of Windows.

Please be sure and read the Release notes section for any late-breaking news about this version of WindowsCRON.

Features

Associations

Error reporting

Event logging

Log file manipulation

Meta tasks

Periodic and one-shot execution

Information window


Associations - WindowsCRON fully supports file extension/application associations. Instead of entering an application name and data file for a task, you may enter just the data file name.


Error reporting - There are three levels of error reporting available for non-fatal errors. WindowsCRON can do any of the following after an error occurs:

* Nothing

* Blink its icon until you check the log file

* Pop up a message box informing you of the error

If logging is enabled, an entry will always be written to the log file.


Event logging - If you enable event logging, WindowsCRON will log all significant events, such as changes to the task list, the execution of a task or purging the log file.


Log-file manipulation - WindowsCRON provides the facilities to view its log file on-screen, print it to a printer or to purge the file.


Meta tasks - WindowsCRON has several predefined meta tasks which may be added to the task list just like any other. Meta tasks, however, do not actually cause WindowsCRON to execute another application. Instead, they direct WindowsCRON to do something such as printing a copy of its log file.


Periodic execution - In addition to allowing the user to execute a task on a given date or dates, WindowsCRON also allows periodic tasks. These can be set to execute every hour, every day, every week or every month. A check-box allows the designation of a one-shot task, to be deleted after being executed.


Information window - WindowsCRON’s information window displays the current date and time, elapsed time which Windows has been running and the number of tasks scheduled for executed on that day. The window is updated every 10 seconds.


Installing WindowsCRON

Installing WindowsCRON is pretty straight-forward. Simply copy WINCRON.EXE into a directory on the search path. WINCRON.INI can be placed either in the same directory as the EXE file, or in the Windows directory.If WindowsCRON cannot file a INI file at start up, it will create one in the Windows directory.

There are also two dynamic-link libraries. COMMDLG.DLL and SHELL.DLL are required for WindowsCRON to run and should be installed in the Windows system directory.

Currently, there are two versions of the WindowsCRON help file. These files are different. Be sure to copy the correct help file into a directory in your path.

WindowsCRON determines what version of Windows it is running on and opens the corresponding help file. So, be sure to install the correct version in the directory with the EXE file (or anywhere else on the search path).

Please read the Release notes section for any late-breaking information about this version of WindowsCRON.


Menu options

Disable/Enable CRON

Tasks

Options

Logging

Info

About

Help


Disable/Enable CRON

This toggle allows the disabling or enabling of WindowsCRON. When disabled, no tasks will be executed, though all other functions remain operative. WindowsCRON will remember whether or not it is enabled across sessions. If WindowsCRON is loaded and finds that it is disabled (i.e. it was disabled the last time it was closed) it will put up a message box warning that it is disabled.

The state is stored in the WINCRON.INI file as shown below.

Enable=[0/1]


Tasks

Selecting the Tasks item from the WindowsCRON menu brings up a dialog box showing the titles of all tasks stored in WINCRON.INI. From here, tasks may be added, deleted or edited.

Select Add to add a new task to the list or Delete to remove an old task. Double-click on a task to edit or change any values. Select Done when finished.

A WindowsCRON task is a description consisting of a command line to execute and a time specification which indicates when the command line should be executed.

The Add Task dialog contains fields to enter the command line, time, date and to check-off the days and months to execute the task. Tasks may also be set to execute at a regular interval. Radio buttons allow hourly, daily, weekly and monthly periods.

Task descriptions are stored in WINCRON.INI in the [Tasks] section. The format is summarized below, under Format.

WindowsCRON checks the task list every minute and executes any tasks which are pending. Because of the relatively low resolution, tasks may be delayed by up to one minute from the specified time. Don’t be alarmed when a task doesn’t execute at precisely the time specified; be patient.

In addition, because the timer message in Windows is given a low priority, it is possible that extreme system loads will cause task execution delays in excess of one minute. No tasks will be lost, however.

Adding tasks

Meta tasks

Storage format


View log

Selecting Logging View will open a window which displays the contents of the current log file. Scrolling up and down (left and right, too) is done with the scroll bars.

The window is modeless, so WindowsCRON will continue to run normally even while the window is open. The window can be closed with the close box, like any other window, or by selecting Logging View again (to uncheck the menu option).

The window is also live; it will update every time a new entry is written to the log file. WindowsCRON stores the size and position of the log window so the appearance of the window can be customized. The parameters are stored in WINCRON.INI as follows:

WindowPos=x1,y1,x2,y2

x1,y1 = screen coordinates of the top-left of the window

x2,y2 = screen coordinates of the lower-right of the window

WindowStyle=[1/2/3]

1 - Default

2 - Minimized

3 - Maximized


Print log

When the user selects Logging Print, a printer-setup dialog box appears. After choosing the right printer, port and options, click “ok” to print the current log file. WindowsCRON just uses the default font for the printer.

If event logging is enabled, an entry is added to the log file showing when it was printed.


Purge log

Logging Purge empties the current log file, after asking for confirmation. An entry is written into the now-empty log file stating when the file was purged.


Information window

The WindowsCRON information window displays the current time and date (updated every 10 seconds), the amount of time that Windows has been running and the number of tasks scheduled for executed on that day. The window is autonomous, so it can be left open as a clock without affecting other WindowsCRON functions.

Close the window by double-clicking on the close box, or by selecting the Info menu option again to uncheck it.


Help

The help menu has several options for providing help.

Opens the Windows Help engine to this help file for WindowsCRON. (And you wondered how you got here, right?)


About

Selecting this menu option opens the “about WinowsCRON” dialog box. Whaddya expect?


Options

The options dialog allows the user to configure several options and defaults for WindowsCRON. All of the options are stored in WindowsCRON’s initialization file, WINCRON.INI.

The synopses after each option show the format in which the setting is stored in WINCRON.INI, under the [Options] section.

Logging

If the “log transactions” box is checked, WindowsCRON will log all of its activities to the log file specified in the edit box. The default name is “WINCRON.LOG.” If no directory path or drive name is specified, the log file is created in the Windows directory.

WindowsCRON will write an entry into the log file for any of several events. Each entry begins with the day, date and time its was written. The events which will be logged are:

* Execution of a task

* Failure to execute a task

* Changes to the task list (additions, edits, deletions)

* Printing or purging the log file

* Turning logging on or off

* Starting or terminating WindowsCRON

* Enabling or disabling WindowsCRON

Logging=[0/1]

LogfileName=<filespec>

Error reporting

These radio buttons control what action WindowsCRON takes when it encounters an error executing a task. If this option is “off,” no action will be taken. If set to “soft,” WindowsCRON will start its icon blinking if an error occurs. Click on the icon to reset the error; you can use the Logging View option to examine the log file and see what happened.

If set to “loud,” WindowsCRON will beep and pop up a message box informing the user of the error. Note that some errors cannot be suppressed by turning error reporting off or down to soft. These are “fatal” errors, which render WindowsCRON unusable anyway. Out-of-memory while building a task list, for example.

ErrorLevel=[0/1/2]

0 - Loud

1 - Soft

2 - Off

Default period

This chooses the default execution period for a new task. When you use Tasks Add to enter a new task, the period is initially set to the option specified here.

Period=[0/1/2/3/4]

0 - As shown

1 - Hourly

2 - Daily

3 - Weekly

4 - Monthly

System logging

If checked, WindowsCRON will write an entry to the log file every time a new top-level window is created or destroyed. This corresponds (roughly) to starting and terminating applications. This check box will be disabled under pre-3.1 Windows. Note that log entries written as a result of system logging will say that the action was performed by the user (e.g. “Application ‘foo’ started by user”).

SysLogging=[0/1]

Suspicious extension warning

If checked, WindowsCRON will warn you if you have entered a command for a task which specifies neither a program or an associated data file. Useful to catch stupid mistakes before walking away and letting WindowsCRON try to do something which it can’t do.

As of this release, Windows occasionally decides to pop up its own box asking you to insert the “right” disk in drive “A” if it cannot find the command you wanted. This, of course, brings everything to a grinding halt. So, leave the warning enabled. It will catch almost all problems like this before you walk away.

Warning=[0/1]


Windows directory - The Windows directory is the directory where WIN.COM and other start-up files reside.


Programs - A program is assumed to be a file with an extension listed after the “programs” entry in the “windows” section of WIN.INI. This usually includes “exe,” “com,” “pif” and “bat.”