CRON.NLM Server Utility 1.7


Cron schedules commands to be executed on a NetWare server at specified dates and times.

Installation Instructions

Copy CRON.NLM to the SYS:\SYSTEM directory on your server.

For NetWare 3.x:
Copy CRON.MSG to the SYS:\SYSTEM directory on your server.
NOTE: You MUST have CLIB.NLM and AFTER311.NLM from LIB312x.EXE

For IntranetWare and NetWare 4.x:

For example, if you have the English message file you would copy CRON.MSG to SYS:\SYSTEM\NLS\4.


load cron [logfile size]

Logfile size specifies the size the logfile will reach before restarting. This keeps the logfile from getting too large and crashing the SYS volume. The default is 5 MB (5000000).

Product Description

CRON.NLM is adapted from the well-known Unix clock daemon. Cron runs all day, spending most of its time asleep. Once a minute it wakes up and reads SYS:\ETC\CRONTAB. Any commands scheduled in CRONTAB matching the current date and time are executed.

Cron records all actions in the log file SYS:\ETC\CRONLOG.

Each crontab entry has six fields, each separated by tabs or spaces:
minute hour day-of-month month day-of-week command

Each entry is checked in turn, and any entry matching the current time is executed. The entry * matches anything. A pound sign (#) is a comment. Valid values are:
day-of-week(0-6) Note: week starts with 0=Sunday

#Min Hr Dat Mo Day Command

#print time every minute
* * * * * time

#print volumes on the hour
0 * * * * volumes

#do backup Mon-Fri at 0430
30 4 * * 1-5 load sbackup

#Start Oracle database every morning at 7:00 a.m.
#Stop Oracle database every Sunday at 7:45 p.m.
0 7 * * * orastart
45 19 * * 0 orastop

#Mon, Wed, Fri at 1930 down server
30 19 * * 1,3,5 down

#Xmas morning at 0900 only
0 9 25 12 * load sing

Enhancements/Bug Fixes

Enhancements to version 1.1:
- Enhanced to removed the 2K size limit for CRONTAB.

Enhancements to version 1.3:
- Enhanced checking of scheduling parameters in CRONTAB.
- Enhanced to execute commands on the minute mark.
- Enhanced to spawn NLMs rather than feeding them to the keyboard buffer. All other commands are still fed to the keyboard buffer.
- Fixed shutdown routine so that CRON can unload itself.

Bug Fixes to version 1.5:
- Whitespace before command were not being removed.
- When "Load <NLM>" is specified, the arguments were not being parsed correctly.

Bug Fixes to version 1.6:
- Month was corrected to check between Jan (1) and December (12). Previously December could not be selected.

Enhancements to version 1.7:
- Cron was enabled for localization. It must now be accompanied by a .MSG file which contains language specific messages.

Known Issues

Issue 1 - The keyboard buffer is stuffed with the command so anyone typing on the console at the time will have their keystrokes interrupted.

Frequently Asked Questions

Q: I try to load CRON on NetWare 3.12 and get a message like "Loader cannot find public symbol: LoadLanguageMessageTable"
"Loader cannot find public symbol: NWfprinf"
A: These messages occur when older verison of CLIB.NLM and AFTER311.NLM are being used. You need to download the latest version of these NLMs. They are both found in LIB312x.EXE.
After these two NLMs have been installed load AFTER311.NLM before trying to load CRON.

Q: I get the message "Can't access crontab". What does this mean?
A: CRON does NOT create a file named CRONTAB; you must do that. CRONTAB is a text file that must exist in SYS:\ETC and have NO extension (NOT CRONTAB.TXT).

Q: How do I create CRONTAB?
A: With your favorite text editor, write the commands and save the file as SYS:\ETC\CRONTAB. Some text editors automatically add a .TXT extension. This is bad. Remove it.

Q: Can I run DOS commands or DOS batch files?
A: Cron can execute any command that is currently available from the NetWare server such as loading NLMs or server console commands. It does not provide DOS shell-like functionality.

Q: Some NLMs stay loaded even when they have completed. The next time Cron tries to load it, it will give a "non-re-entrant" error. How can I unload them?
A: Some NLMs have command-line options for auto-unloading. If not, you can schedule an unload command one minute before the load command. For example, if you want XYZBACK.NLM to run EVERY night at 3:00 am, you would use "0 3 * * * load xyzback" in CRONTAB. Unfortunately, xyzback requires a manual shutdown. It ran fine early Friday morning, but because the administrator didn't unload xyzback, the server could not load it fresh again early Saturday and Sunday mornings. A new command needs to go in CRONTAB: "59 2 * * * unload xyzback".

Q: Can I redirect NLM output to keep status reports?
A: Although you get a status report of cron in CRONLOG, you can NOT get output from any NLM that cron schedules



Comment List
Related Discussions