Running server tasks

Server tasks perform complex administration procedures -- for example, compacting databases and updating indexes. You can run a server task manually, by loading the task at the server console or by using the Domino® Administrator Task - Start tool, Server menu, or the Administrator console. Or you can run the task automatically when the server starts by adding the name of the task to the ServerTasks or ServerTasksAt settings in the NOTES.INI file. In addition, you can create a Program document in the Domino Directory to run a task at scheduled intervals.

About this task

In addition to the server tasks that Domino supplies, you can write and run custom tasks that are stored as Microsoft™ Windows™ batch files, UNIX™ shell scripts or programs, and API programs.

From the local server console

Open the server console and enter the server task at the command prompt.

From the Domino Administrator server console

Procedure

  1. From the Domino Administrator, open the console for the server on which the program runs by clicking Console on the Server > Status tab.
  2. In the Server console command field, type:
    Load taskname
    

    where taskname is the name of the server task that you want to run.

From the Domino Administrator Start - Task tool

Procedure

  1. From the Domino Administrator click the Server > Status tab.
  2. Click Server Tasks.
  3. Open the set of Task tools.
  4. Click Start.
  5. In the Start New Task box, select a server task from the list. Select advanced options to specify additional parameters.
  6. Click Start Task.

In the NOTES.INI file

About this task

Many tasks run, by default, at specific times. You can schedule additional tasks to run by editing one of these settings in the NOTES.INI file:

  • ServerTasks starts tasks automatically every time the server starts up
  • ServerTasksAt starts tasks at a specified time

In a Program document

About this task

To run a task on a server at a regularly scheduled time or at server startup, create a Program document in the Domino Directory.

A Program document is used to automatically run a server task at a specific time. You can also use a Program document to run an OS/2 command file, a UNIX shell script or program, or an API program. You can use the Program document to schedule tasks and/or programs.

If you create a UNIX shell script or API program, you can use any of these characters for the name. Do not use backslash (\) or any other characters because this can cause unexpected results.
  • Letters A - Z
  • Numbers 0 - 9
  • Ampersand (&)
  • Dash (-)
  • Period (.)
  • space ( )
  • Underscore (_)
  • apostrophe (')
  • forward slash (/)

Procedure

  1. From the Domino Administrator, open the Domino Directory. Go to the Servers view, and open the Server document.
  2. Choose Create > Server > Program.
  3. On the Basics tab, complete these fields:
    Table 1. Basics tab

    Field

    Enter

    Program name

    The name of the server task you want to run.

    Command line

    The command that starts the task, including any arguments to the command.

    Server to run on

    The full hierarchical name of the server on which to run the task.

    Comments

    A program description or additional information.

  4. Click the Schedule tab, and then complete these fields:
    Table 2. Schedule tab

    Field

    Enter

    Enabled/disabled

    Choose one:

    • Startup to run the program only when the server starts.
    • Enabled to schedule the task to run at specific times.

    Run at times

    The first time of day you want the task to run.

    Repeat interval of

    The number of minutes before the task should run again.

    Days of week

    The days of the week when the task will run.

  5. Optional: Click Administration, and then enter the names of additional owners/administrators.
  6. Close and save the document.

What to do next

To view all tasks scheduled to run on a server, use the Show Schedule command.