[Back]

Setup without WarpcronSetup

with any ASCII text editor

This document describes all possible warpcron.cfg keywords and theire values, it is written by Warren Hughes, a very friendly warpcron user :-)

The warpcron.cfg file tells warpcron what to do and how to do it. You can write and maintain warpcron.cfg with a text editor or with warpcron's Presentation Manager configuration utility, wcrsetup.exe.

Sections are enclosed in square [] brackets. The file consists of keyword pairs of the form - keyword=value
You DO NOT have to specify every keyword, just use the ones you need.


ATTENTION - IMPORTANT - ATTENTION

Warpcron gets the format for Dates and Times from your OS/2 INI files.
This means that they will vary from country to country.

In this file the date is day-month-year and the time is hour:minute:seconds

TAKE CARE TO USE YOUR LOCAL SETTINGS FOR DATES AND TIMES


Sections: [Program] [Screen] [Internet] [Events] [Event X]

The warpcron.cfg is divided in different sections, in each section there are pairs of keywords and values.
A keyword can be anything.
A value can be:

  • a string: this is an example string
  • an integer number: 23453
  • a boolean value: True / False
An example for section "demo" with three pairs:
	[demo]
	AStringValue=this is a string value
	ANumber=2423423423
	ABoolean=True
	


[Program]

These keyword pairs are global and can NOT be set for each event.

CfgReadSem=file If this file is found warpcron will read its config file.

This keyword is not affected by and has no effect on the ChkConfig keyword

This keyword is OPTIONAL
There is NO DEFAULT

Examples CfgReadSem=f:\os2\apps\vio\warpcron\wcconfig.now
CheckConfig= Can be true or false. If TRUE Warpcron will check its config file (usually warpcron.cfg) for changes once every minute and reread it if changes have been made.

If false Warpcron will NOT do this.

WarpCron detects changes by keeping track of the last time its config file was written to, If you are using a text editor you must save any changes you make for warpcron to know about them.

This keyword IS OPTIONAL
The default is TRUE

Editor= The editor warpcron should start when you press the "C" key from within warpcron to edit its config file

If the editor is not in your PATH statement you should give the full path name.

REMEMBER, you can change warpcron.cfg with wcrsetup.exe while warpcron is running.

This keyword IS OPTIONAL
The default is tedit.exe

Examples editor=tedit.exe
editor=f:\os2\editors\vi\bin\vi.exe
EndSem= If this file exists warpcron shuts down.

You can specify just a file name or give the full path for the file. The filename can include wildcard characters, (see the OS/2 documentation for an explanation of wild card characters)

Warpcron will start any events that have the RunAtEnd=true keyword set.

If the semaphore file contains a numeric value warpcron will end with this number as its errorlevel.

One way to write a numeric value to a semaphore file is

echo 99 > endsem
and warpcron will end with an errorlevel of 99

This keyword IS OPTIONAL
There is NO DEFAULT

Examples EndSem=e:\os2\warpcron\end_now
EndSem=wc?on.end
LogPath= The directory where warpcron keeps its log file (usually warpcron.log)

This keyword IS OPTIONAL
There is NO DEFAULT

Examples e:\os2\warpcron
LogFile= The name of warpcron's log file

This keyword IS OPTIONAL
The default is warpcron.log

Examples wcron.log
MissPath= The directory where warpcron puts a file (usually warpcron.mis) listing events that should have been started while warpcron was not running.
They will be started the next time warpcron is run.

Read the instructions for UNMISSABLE EVENTS.

This keyword IS OPTIONAL
There is NO DEFAULT

Examples e:\os2\warpcron
PidPath= The directory where warpcron puts its pid file (usually warpcron.pid). This file contains warpcron's numeric process ID or PID

This keyword is OPTIONAL
There is NO DEFAULT

Examples e:\os2\warpcron
REG= Your registration code. If you send a post card and your email address you will receive a code to place here. When you do warpcron starts a little faster and displays a message thanking you for the card. You also get a good wholesome feeling and the ability to dodge rain drops :-)

This keyword IS OPTIONAL
The default is 0

Examples REG=ndsxlsvqt
SignTime= This is a numeric value. It tells warpcron to write HELLO to it's log file every X hours.

A 0 (zero) here means that this function is disabled and warpcron will not sign its log file.

This keyword IS OPTIONAL
The default is 0

Examples SignTime=2
YourName= Your full / real name.

This keyword IS OPTIONAL
There is NO DEFAULT

Examples YourName=Anna Harris
[Back]


[Screen]

These keyword pairs define the colour and size of Warpcron's screen.

TextColor= The colour used for text
BackColor= The colour used for the screen background
WarnColor= The colour used for warnings
InfoColor= The colour used for information messages on the top three lines of the screen

Colours for the text and background.
Default is lightgray on black.
For background colours:

0 = black
1 = blue
2 = green
3 = cyan
4 = red
5 = magenta
6 = brown
7 = lightgray

For textcolor same as above and:

8 = darkgray
9 = lightblue
10 = lightgreen
11 = lightcyan
12 = lightred
13 = lightmagenta
14 = yellow
15 = white

The default values are:
TextColor=7, BackColor=5
WarnColor=12, InfoColor=14

SmallScreen= Can be true or false
LargeScreen= Can be true or false
[Back]


[Internet]

These keyword pairs configure warpcron's email features.

EmailLog=
EmailOnStart=
EmailOnEnd=
EmailOnTrap=
Warpcron will send its log file or a message to say it's started, ended, or that there was a problem (trap) via email if the right keyword is set to true. If the keyword is set to false warpcron will not send email.

These keywords ARE OPTIONAL
The default is FALSE

EmailTo= Where to send any email.

This keyword is OPTIONAL
There is NO DEFAULT

Examples billy@microsoft.com
EmailFrom= The address warpcron should put in the from line of any email it sends.

This keyword IS OPTIONAL
There is NO DEFAULT

Examples WarpCron@wibble.swamp.org.uk
EmailPrg= The program warpcron should use to send email.

This keyword IS OPTIONAL
There is NO DEFAULT

Examples d:\tcpip\bin\sendmail.exe
d:\tcpip\myapps\warpmail.exe
EmailPrgParam= The parameters warpcron should pass to the email program.

This keyword IS OPTIONAL
There is NO DEFAULT

Examples - -af $FILE
-h -f$FILE

$FILE is the placeholder for the filename of the textfile to send.

[Back]


[Events]

The NoOfEvents must be in the [Events] section.

NoOfEvents= The number of events that exist in the config file. This is a numeric value between 1 and 99.

This keyword IS REQUIRED
There is NO DEFAULT

[Back]


[Event X]

The following keyword pairs are for each event which is saved in his own section ([Event 1], [Event 2], ...).

DelSemAfterStart Can be true or false. If true warpcron will delete the semaphore file.
If false it will not.

If warpcron does not delete the semaphore file it will watch it until it is deleted. After it is deleted warpcron will wait until it is created again and then start the event can be started again.

If warpcron does not delete the semaphore file wild cards are OK.

This keyword IS OPTIONAL
The default is FALSE

Date= The date from which this program should be run.

This keyword IS OPTIONAL
There is NO DEFAULT

Examples 20-08-1999
SU=
SA=
MO=
TU=
WE=
TH=
FR=
Can be true or false. Usually you can leave the keywords for the days of the week blank, unless you don't want warpcron to run an event on a certain day, when you should enter false

These keywords ARE OPTIONAL
The default is true

DenyPath= When this file exists warpcron will not start this event. Wildcards are allowed.

This keyword IS OPTIONAL
The default is none

Examples e:\os2\warpcron\dontrun
DoNotRunFrom=
DoNotRunUntil=
Stops an event being between the DoNotRunFrom and the DoNotRunUntil times

These keywords are just for events with a RunEveryXMin or RunEveryXHour keyword. They DO NOT influence semaphores or event with just a single time statement.

These keywords ARE OPTIONAL
There is no default

Examples DoNotRunFrom=01:05
DoNotRunUntil=03:35
Log= Can be true or false.
If true warpcron will make an entry in its log file for the event when its started. If false warpcron will not do this.

This keyword IS OPTIONAL
The default is true

Min= Can be true or false.
If true warpcron will start the event minimised.
If false warpcron will start the event Maximised.

This keyword IS OPTIONAL
The default is false

Name= The name of the event.

This Keyword IS REQUIRED
There is NO DEFAULT

Examples name=format windows drive
Parameters= The parameters to be passed to the program.
This Keyword is like the 'Parameters:' field in an OS/2 program object.

This Keyword is OPTIONAL
There is NO DEFAULT

Examples Parameters=-k -C -f hello.txt
Parameters=writing.txt
Program= The name of the program to start.
Include both the drive and path.
This keyword is like the 'Path and Filename:' field in an OS/2 program object.

You can specify .CMD .BAT & .EXE files

If you use 4OS/2 you can specify .BTM files as well.

Warpcron uses the COMSPEC environment variable to determin what command processor it should use.
It then starts this command processor and passes the name of the .bat .btm or .cmd file to it as a parameter.

WarpCron starts every program from the program's directory, this means that WarpCron extracts the directory out of your PROGRAM keyword and changes into it before starting the program.

This Keyword is REQUIRED
There is NO DEFAULT

Examples Program=f:\os2\bin\program.exe
Program=e:\scripts\something.cmd
Related= Start programs as child process of warpcron.
Can be true of false.
If true warpcron will start this event as a child. Warpcron can kill programs started as children directly without using go.exe, kill.exe or some other process killer.

This keyword IS OPTIONAL
There is NO DEFAULT

RunAtStartup= Can be true or false.
If true warpcron will run an event when it starts up.
If false it will not.

This keyword IS OPTIONAL
The default is disabled

RunAtEnd= Can be true or false.
If true warpcron will run an event when it shuts down.
If false it will not. This keyword IS OPTIONAL

The default is disabled

RunEveryXMin=
RunEveryXHour=
RunEveryXDay=
RunEveryXMon=
Start an event every x minutes, days, hours or months.

NOTES:
If you specify more than one RunEveryX...,
RunEveryXMin has priority over RunEveryXHour
over RunEveryXDay over RunEveryXMon.

These keywords ARE OPTIONAL
The default is 0 (disabled)

Examples RunEveryXhour=6
RunEveryXMonth=2
SemDelay= This is the number of minutes to wait before really starting an event after a semaphore file has been found.

This keyword IS OPTIONAL
The default is 0

Examples SemDelay=05
SemPath= Warpcron will start an event when it finds this file.

This keyword IS OPTIONAL
There is no DEFAULT

Examples SemPath=e:\os2\warpcron\startdos.now
Type= The session type for program.
Possible values are
s p f w d D t k
  • s = WPS Object
  • p = OS/2 Presentation Manager.
  • f = OS/2 Full screen.
  • w = OS/2 Windowed.
  • d = DOS Window.
  • D = DOS Full screen.
  • t = detached
  • k = Kills another session started by warpcron.
NOTES:
  • k will NOT work unless 'StartRelated' is set to 'true' for the event you want to kill.
    See the notes for 'Related' earlier in this documentation.
  • t this is the same as OS/2's detach command.
    Any program you start detached will produce no output to the screen and accept no input from the keyboard.
  • s this means open the default view of a WPS object.
This keyword IS OPTIONAL
The default is f
Examples Type=f
Time= The time to start a program in hours, minutes and seconds.

This Keyword is OPTIONAL
The default is 00:00:00

Examples Time=04:05:05
Time=22:35:50
Unmissable= Can be true or false.
If true warpcron will check at startup for any unmissable events and whether the time for those events to be started has passed.
If the time has passed warpcron will start them immediately.
The unmissable events are saved in the file warpcron.mis.

This keyword IS OPTIONAL
The default is disabled

[Back]


Author: Warren Hughes (text), Julian Buss (converting to html)


and the famous editor MEd!