7.2 Scheduling Jobs in iManager

iManager’s job scheduler contains the similar functionality as the job scheduler found in Designer. However, iManager’s job scheduler can start and stop a job, as well as get a job’s status.

The Jobs page is accessed from the Identity Manager Driver Overview page and contains a table showing the existing job objects for the selected driver, which is listed with the name of the job object. Below is an example of scheduled jobs that are created for the Job driver.

Figure 7-9 The Job’s Tab from the Identity Manager Driver Overview

7.2.1 Jobs Column Headings

The headings include the job's name, whether the job is enabled or disabled, when it is scheduled to run, and the job description. Click the job’s name to bring up the Job Properties page. Click the enable/disable icon under the Enabled column to enable or disable the job. The Next Scheduled Run heading shows if the job is scheduled to run, and if it is, the date when the job is scheduled. Click the job's description to see a pop-up window listing the job's full description.

Use the commands in the menu bar to perform the following operations.

New

To create a new job in iManager:

  1. Click New to bring up the Create Job page.

    Creating a New Job
  2. In the Job Name entry, give the job a descriptive name.

  3. Under Job Type, select an Installed or a Custom job. The default is Installed.

    1. Under Installed, choose a definition for the job. The Create Job page displays all jobs that have been installed on the servers. Identity Manager 3.5 comes with three job definitions:

      • Random Password Generator: Generates a random password for each object in the job’s scope. The password is generated by NMAS to match the Password Policy object that the job references. These Password Policy objects are not usually the same as those used for eDirectory user password policies.

        The job submits the generated passwords one at a time to the driver’s Subscriber channel. The Subscriber channel policies must take action on the passwords.

      • Schedule Driver: Starts or stops the associated driver. You can also toggle a driver to start the driver if it is stopped or to stop the driver if it is running.

      • Subscriber Channel Trigger: Submits zero or more trigger documents to the Subscriber channel. The submission can either be a document per object if a scope is defined, or it can be a single trigger event if no scope is defined.

        Trigger event documents identify the job and the scope object. A trigger event can bypass the cache and “go to the head of the queue” if desired. Trigger jobs allow you to use driver policies that you can customize for your personal requirements.

    2. If you select Custom, enter the XML code that defines the custom job.

  4. In the Server field, select the server or servers to perform the job execution.

  5. Click OK. The new job opens Job Property page.

  6. Continue with Section 7.2.2, Setting the Job’s Parameters.

Run Now

Select a job by clicking the box to the left of the job, then click Run Now.

Stop

Select a job by clicking the box to the left of the job, then click Stop.

Enable

Select a job by clicking the box to the left of the job, then click Enable. The Disabled icon in the Enabled column changes to a check mark when the job is enabled.

Disable

Select a job by clicking the box to the left of the job, then click Disable. The Enabled icon in the Enabled column changes to the Disabled icon.

Get Status

Select a job by clicking the box to the left of the job, then click Get Status.

Delete

To delete a job, click the box to the left of the job name, then click Delete. You see a message stating that the selected job will be deleted from the directory. Click OK to delete the job, or click Cancel to stop the operation. You can click multiple boxes to delete multiple jobs, or click the upper left box to delete all of the jobs listed.

7.2.2 Setting the Job’s Parameters

Click a job to bring up the Job Property page and set up how you want the job to run.

Selections Under the General Tab

A line at the top of the General tab shows the Java class name of the job.

Figure 7-10 Items Under the General Tab

  1. To enable the job, select Enable job.

  2. To delete the job after it runs, select Delete job after it runs once.

  3. In the Server column, select the server or servers where this job should run.

    A filtered list of servers is available to help you assign this job. A custom job may be installed on one server but not on another. In this case, the server without this custom job is filtered out of the Server List.

    A job can be assigned to multiple servers as long as it has been installed on each server. iManager only allows this association if the jobs are properly installed and packaged so that the Metadirectory engine can see them.

  4. For the Email Server entry, browse to the default notification collection template. Select the browse button, select the Security container, then the Default Notification Collection object. The fully distinguished path is Default Notification Collection.Security. Or you can use the history icon to select from previously selected items.

  5. Check the other job settings:

    • The Display Name entry shows which type of job has been selected.

    • The Description field displays the description that has been written for the job type.

Selections Under the Schedule Tab

The Schedule tab allows you to set up when you want to run the job.

Figure 7-11 The Job Options for the Scheduler Tab

  1. Select the Run on a schedule option to set the date and time, and whether to run the job daily, weekly, monthly, yearly.

    Or select the Run manually option to run the job when you choose to.

  2. With Run on a schedule selected, type the hours and minutes when you want the job to start running. Use the drop-down menus to select AM or PM. The default is 1:00 AM.

  3. If you want to run the job repeatedly, use the Daily, Weekly, Monthly, Yearly, or Custom fields to select when you want it to run.

    For example, if you want the job to run weekly, select Weekly, then select the day you want it to run. If you want the job to run once a month, select Monthly, then click the Calendar icon to select the day of the month.

    Selecting the days of the month
  4. If you select Custom, you can choose minutes, hours, days, months and days of the week by using crontab syntax:

    • Minute: 0-59; Hour: 0-23; Day of month: 1-31; Month: 1-12; Day of week: 0-6, 0=Sunday; *=all.

    • Use a comma to separate integers and ranges, and a space to separate each field.

    The information displayed in the crontab string field displays any settings you make in the Custom entry. For example, if you type 30,2,1,12,5 and press Enter, those numbers are displayed in the crontab string field.

  5. Once you have selected the day or days you want to schedule the job, click OK.

Selections Under the Scope Tab

Scopes allow you to define the objects that this job applies to. An object in eDirectory can be a container, a dynamic group, a group, or a leaf object. If you select a group object, you can apply the job to the group's members, or only to the group. If you select a container object, you can apply the job to all descendants in that container, to all of the children in the container, or to the container only.

  1. Click Add to add a scope to the job object.

  2. On the Job Scope page, use the Browse icon to browse to the object. Click OK to add the scope object.

    Specifying the job scope criteria
  3. If the object is a container, select how you want to apply the job:

    • Apply job to all descendents of this container

    • Apply job to the children of this container

    • Apply job to this container only

  4. (Optional) If you select Apply job to the children of this container or Apply job to all descendents of this container, you can specify the classes you want to scope. Click the Plus icon to bring up the Enter the Class Name page and specify the classes you want to scope. Then click OK.

    Type the Class name

    The classes are added to the Apply job only to objects that are one of the following classes box. To remove a class, select it and click the Minus icon.

  5. If the object is a group or a dynamic group, select the Apply job to the members of this group or Apply job to this group only if the scope is for the group.

  6. After the scope criteria are selected, click OK to add the scope job to the Job Scope page.

  7. If you need to edit a scope, click the scope name.

  8. To remove a scope, select the scope name, then click Remove.

Selections Under the Parameters Tab

The Parameter page allows you to set parameters used by the job when the job is doing its work. What you can do depends on the type of job you selected. The following procedure uses a Subscriber Channel trigger for its example.

Figure 7-12 The Job Parameter Page for the Subscriber Channel Trigger Job

  1. If you want to submit a trigger document for scoped objects that do not have a driver association, select True. Otherwise, keep the default of False.

  2. If you want to use the job’s Common Name (CN) as a document identifier trigger, keep the default of True. Otherwise, select False.

  3. (Optional) If you select False, specify the string that the job can use as the value for the trigger element’s Source attribute.

  4. Select a method for submitting the trigger documents. If you want to queue the job the trigger is from, keep the default of Queue (use cache). Otherwise, select Direct (bypass cache).

  5. (Optional) If you select Direct (bypass cache), you are presented with the Start driver if not running option. If you want to start the driver if it is not running, keep the default of True. Otherwise, select False.

  6. (Optional) If you select True for the Start driver if not running option, you are presented with the Stop driver when finished processing triggers option with the default of True. Use the default to stop the driver after it finishes processing the trigger job, or select False to keep the driver running.

All job definitions have their own parameter sets.

Selections Under the Results Tab

The Results tab allows you to define what you want to do with the job results. The Results page is divided into two parts: Intermediate Result and Final Result, with the following results allowed: Success, Warning, Error, and Aborted.

To the right of the Results column is the Action column. Clicking the Action column allows you to set how you want to be notified for each result. Actions include sending an audit result or sending an e-mail when the result completes. If you do not select an option, no action is taken for the result.

Figure 7-13 Setting Up Who Gets Notified from the Results Tab

  1. Click an Action entry to bring up the Result Notification page.

    Creating a mail recipient profile
  2. Under Send e-mail, select who you want to send the results to by typing in the user’s or group’s e-mail name.

    The To, Reply-to, and Email template fields are required for a profile. The fully distinguished name for the Email template is Default Job Notification.Default Notification Collection.Security.

  3. When you have filled in the information, click OK.

  4. If you want the results to go to Novell Audit, select Audit result.

  5. Use Step 1 through Step 4 for each of the options:

    • Intermediate Success

    • Intermediate Warning

    • Intermediate Error

    • Intermediate Abort

    • Final Success

    • Final Warning

    • Final Error

    • Final Abort

    If you do not select an option, no action is taken for the result.