Novell Home

My Favorites

Close

Please to see your favorites.

Automating Events on a NetWare Server

(Last modified: 27Sep2004)

This document (10058252) is provided subject to the disclaimer at the end of this document.

goal

Automating Events on a NetWare Server

fact

GroupWise

NetWare

symptom

AUDIENCE: NetWare and GroupWise administrators.

fix

THE HOOK: Perhaps you've wanted to kick off a process on a NetWare server during the weekend, but you didn't want to spend your time on the weekend to kick off the process.

HOW TO USE THIS DOCUMENT: There's a lot of explanation in this document for those that like explanation. For those of you that just want to configure things, without reading the documentation, look for the "- ACTION # X" lines in this document.

PURPOSE: The following is a full explanation of how my customer and I designed an automated routine to have the GroupWise POA completely re-index a GroupWise post office every week. The goal is to show precisely the solution we used, but with you're own creativity you should be able to create other automated solutions to use on a NetWare server.

--SCENARIO--

ISSUE: The GroupWise POA leaves all kinds of garbage files in the PO\OFUSER\INDEX directory.

Currently the only way to clean up these files is to issue a CTRL-Q on the GroupWise POA. The regular QuickFinder Indexing process that you can scheduled on the POA, does not do the same thing as the CTRL-Q keystroke from the GroupWise POA's NetWare console screen. My customer has found that doing a CRTL-Q on their GroupWise POA has helped them net an average of 400 megs of disk space. This only happens the first time they run the CTRL-Q because it was never run before this.

See the following document for more information on this concept of using CTRL-Q: http://support.novell.com/cgi-bin/search/tidfinder.cgi?2956138

QUESTION: How can we automate the CTRL-Q routine?

SOLUTION: Use Novell's NCSCRIPT, COPY and CRON NLMs to create an automated solution that hits CTRL-Q on the GroupWise POA every Saturday at 9:00 P.M.


-NCSCRIPT.NLM-

The NCSCRIPT.NLM was created by Novell Consulting. Amongst other things, this clever NLM allows you to pass keystrokes to any screen on a NetWare server that has a user interface. When NCSCRIPT is first loaded it makes a simple queuing structure in a directory it creates off the root of the SYS: volume called "DISTRIB". Script files can be placed in the SYS:DISTRIB\JOB directory, and NCSRIPT will pull that directory for script jobs either when it is loaded, or if NCSCRIPT is already loaded it polls the DISTRIB\JOB directory every 5 seconds.

The NCSCRIPT.NLM can be obtained from the following location:

http://www.novell.com/coolsolutions/freetools.html

The documentation that comes with this NLM is very good. So you can read up on the following script that becomes my "QFPOAJOB" file in this scenario:

ROBOT: "GroupWise POA - GWPO.GWDOMAIN" <CTRL-Q>

This script will have to modified so that it's appropriate for the POA that you are running on your server. For example if post office is called ACMEPO and post office is below a domain is called CORP then your QFPOAJOB file would read like this:

ROBOT: "GroupWise POA - ACMEPO.CORP" <CTRL-Q>

In our scenario we will save this ASCII text file to the SYS:DISTRIB directory. The file must NOT have a file name extension to it. For example the file cannot be named QFPOAJOB.TXT. It must only be called QFPOAJOB. This script file tells NCSCRIPT to go to the screen called "GroupWise POA - ACMEPO.CORP" and hit the combination keystroke of "Ctrl-Q".

- ACTION # 1: Place the NCSCRIPT.NLM in the SYS:SYSTEM directory.

- ACTION # 2: Load NCSCRIPT one time, then unload it, this will create the SYS:DISTRIB directory and queue subdiectories

- ACTION # 3: Create the QFPOAJOB file in the SYS:DISTRIB directory. You can just copy and paste the script created above and save it to an ASCII file. Then customize it appropriately.


-COPY.NLM-

The COPY.NLM was created by Novell a few years back. It allows you to copy files while at the NetWare console. The COPY.NLM has now been replaced by the TOOLBOX.NLM. My customer and I chose to load the COPY.NLM because it is simpler to use then TOOLBOX.NLM. We obtained the COPY.NLM at http://www.netwarefiles.com

- ACTION # 4: Place the COPY.NLM in the SYS:SYSTEM directory.

The COPY.NLM will be used to copy the QFPOAJOB file from the SYS:DISTRIB directory to the SYS:\DISTRIB\JOB directory.


- CRON.NLM -

The CRON.NLM is an NLM that reads an ASCII text file called "CRONTAB" that you create in the SYS:ETC directory. The CRONTAB file tells the CRON.NLM when to run a NetWare console process, such as a NetWare *.NCF batch file. The formatting for the CRONTAB, and the CRON.NLM can be obtained at the following URL:

http://support.novell.com/cgi-bin/search/tidfinder.cgi?2939440


To have the CRON.NLM run the QFPOA.NCF every Saturday at 9:00 P.M. the SYS:ETC\CRONTAB file looked like this:


00 21 * * 6 QFPOA.NCF


NOTE: Make sure the CRONTAB file does not have an extension to it. For example it cannot be called CRONTAB.TXT. We will discuss what's in the QFPOA.NCF just a little bit later.

- ACTION # 5: Put "LOAD CRON.NLM" (don't include the quotes) in the AUTOEXEC.NCF file of your file server

- ACTION # 6: Put the CRON.NLM in the SYS:SYSTEM directory

- ACTION # 7: Create your CRONTAB file and place it in the SYS:ETC directory

- ACTION # 8: Load CRON.NLM


- QFPOA.NCF -

We now know that the CRON.NLM will load the QFPOA.NCF file every Saturday nigh at 9:00 P.M. Now we got to make the QFPOA do the following:

1. Use the COPY.NLM to copy the QFPOAJOB file to SYS:DISTRIB\SCRIPTS\JOB directory for NCSCRIPT to process.
2. Load NCSCRIPT so that it performs the CTRL-Q function on the POA
3. Unload both the COPY.NLM and the NCSCRIPT.NLM so they are not resident in memory

Let's look at what the QFPOA.NCF has in side of it:

# QFPOA.NCF BEGIN

# This unloads the COPY.NLM
# so that in case it's already loaded
# there are no errors when this NCF tries to load it again

UNLOAD COPY.NLM

# This unloads the NCSCRIPT.NLM
# so that in case it's already loaded
# there are no errors when this NCF tries to load it again

UNLOAD NCSCRIPT.NLM

# This uses the COPY.NLM to copy the
# file called QFPOAJOB to NCSCRIPT'S
# incoming job queue

LOAD COPY SYS:DISTRIB\QFPOAJOB SYS:DISTRIB\JOB\QFPOAJOB

# This unloads COPY.NLM, after a 10 second wait
# The question mark tell the NetWare 4.11 and 5.x
# OS to pause 10 seconds (by default)

? UNLOAD COPY.NLM

# This loads NCSCRIPT and tells
# NCSRIPT not to purge it's \JOB queue
# which NCSCRIPT usually does on startup
# NCSCRIPT will first process the QFPOAJOB script
# and then it will purge the QFPOAJOB file

LOAD NCSCRIPT /NOPURGE

# This unloads causes a 10 second delay for
# NCSCRIPT to load and process it's job

? CLS

# This unloads NCSCRIPT after 10 seconds
# In total we have given NCSCRIPT 20 seconds
# which is more than enough time (This is NetWare you know, it's fast!)

? UNLOAD NCSCRIPT

# QFPOA.NCF END

- ACTION # 9: Create the QFPOA.NCF file and place it in the SYS:SYSTEM directory

CONCLUSION: The CRON.NLM will run the QFPOA.NCF file every Saturday at 9:00 P.M. The COPY.NLM will copy the NCSCRIPT job file, just before NCSCRIPT loads. The NCSCRIPT.NLM will select the CTRL-Q keystrokes on the POA, and the POA will totally re-index the post office, and delete un-needed files in the PO\OFUSER\INDEX directory..

disclaimer

The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.

  • Document ID:
  • 10058252
  • Solution ID: NOVL31867
  • Creation Date: 08Nov2000
  • Modified Date: 27Sep2004
    • NovellGroupware

      NetWare

      eDirectory

Did this document solve your problem? Provide Feedback