Using the CRON.NLM Utility to Schedule Server Console Commands
Articles and Tips: tip
01 Apr 1998
CRON.NLM is a NetWare server utility which can be used to schedule server console commands, including the loading and unloading of server NLMs. You can use this utility with NetWare 3.x, NetWare 4.x, and intraNetWare server software.
You can get the CRON.NLM utility from the Novell Support Connection web site at http://support.novell.com/. From the Search page, perform a Knowledgebase search on the word CRON to see the readme text and to download the file (document number 2933050). Or you can use File Finder and search for CRONNLM4.EXE to retrieve the file. (The CRON.NLM utility also comes on the NetWare 3.2 Enhancement Pack and on the monthly Support Connection CD subscription.)
Note: CRON.NLM is provided from Novell free of charge as a courtesy to our customers. It is not a Novell-supported product. Problems or questions regarding this product can be reported via e-mail to firstname.lastname@example.org.
Using the CRON.NLM Utility
You can use this utility to help in your daily system administrative chores. To use CRON.NLM, you need to store the utility's schedule of commands that you want to run in a file named CRONTAB, which you create through any ASCII editor using the syntax shown below.
Create one line for each command to be executed. Each line must contain six fields, in the order shown below, separated by tabs or spaces. (Valid values are shown in parentheses next to the field name.)
Minute (0-59, *) Hour (0-23, *) Day-of-month (1-31, *) Month (0-11, *) Note: 0=January Day-of-week (0-6, *) Note: 0=Sunday Command to be executed
The asterisk (*) is a wildcard and matches anything. Place the completed file in the SYS:ETC directory of the server on which you want to schedule commands and operations.
The following is an example of a CRONTAB file. Note that the # character indicates a comment.
#Mn Hr Dat Mo Day Command #print time every minute * * * * * TIME #print volumes on the hour 0 * * * * VOLUMES #do backup Mon-Fri at 4:30 a.m. 30 4 * * 1-5 LOAD SBACKUP #Start Oracle database every day at 7:00 a.m. #Stop Oracle database Sundays at 7:45 p.m. 0 7 * * * ORASTART 45 19 * * 0 ORASTOP #down server Mon, Wed, Fri at 1930 30 19 * * 1,3,5 DOWN #run SING program Christmas morning at 0900 only 0 9 25 11 * LOAD SING
The CRON utility is adapted from the well-known Unix clock daemon. CRON.NLM reads the SYS:\ETC\CRONTAB file for scheduling information any time the date of the file has changed. Every minute on the minute mark, CRON executes the commands that are scheduled for the current date and time.
Note: Console keyboard input is not accepted by the server during CRON execution.
CRONLOG Log File
CRON.NLM records the commands it performs and the resulting actions in a log file named CRONLOG stored on the SYS: volume in the SYS:\ETC\ directory. You can set the size of the CRONLOG file so that it doesn't get too big. The CRONLOG maximum file size is the size in bytes the log file will reach before truncating older information. For example, at the server console, type
LOAD CRON 100000 <Enter<
to set the log file to a maximum size of 100KB. The default maximum size is 5MB. Setting a maximum size keeps the log file from getting too large and causing problems on the SYS volume where the log file is stored.
Some FAQs on the CRON.NLM Utility
* Originally published in Novell AppNotes
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.