Skip to main content

NIM

Step 9: Add a scheduler to automate jobs (tutorial)

In this step, we'll schedule our job to run on a regular basis.

Add the schedule
  1. Go to Scheduler > Overview.

  2. Click Add.

  3. For the Type, select sync.

  4. Enter a Name.

    For this example, we'll call it HR500_AD, following the convention SourceSystem.

    2023-10-13_10-28-25.jpg
  5. Click Save.

    2023-07-11_14-06-50.jpg
Configure the schedule
  1. For this example, we'll turn off the Evaluate toggle, which is used to send email notifications in advance of scheduled runs.

    2023-07-11_14-11-41.jpg
  2. The Collect pane specifies which systems will be collected prior to execution.

    For this example, we'll add both our HR500 source system and our AD target system. And for both systems, we'll set the Maximum Age to 0 and enable Stop On Error.

    2023-07-11_14-13-37.jpg
  3. In the Execute pane, we'll click Add and add our HR500_AD job to this schedule. We'll also enable Stop On Error here.

    2023-07-11_14-15-33.jpg
  4. Click Save.

  5. Go to the Schedule tab.

    2023-07-11_14-18-34.jpg
  6. Enable the Scheduling Enabled checkbox.

  7. We'll configure the schedule to run at 2:15am, M-F.

    2023-07-11_14-19-40.jpg
  8. We'll click Calculate Instances to confirm the upcoming time/dates that the schedule will execute.

    2023-07-11_14-20-41.jpg
  9. Click Save.

Perform an initial manual run & troubleshoot errors
  1. Go back to Scheduler > Overview.

  2. Click Manual Run for the HR500_AD schedule.

    2023-07-11_14-27-00.jpg
  3. In this case, the schedule fails in the middle of execution.

    2023-07-12_10-59-24.jpg
  4. We'll click the red error row in the Log pane to view more details.

    2023-07-12_11-01-53.jpg

    Here, we can see that the error occurred for the employee Anita Fitzpatrick.

    2023-07-12_11-03-04.jpg
  5. We'll also click this error row to further drill down.

    2023-07-12_11-06-46.jpg
    2023-07-12_11-07-31.jpg
  6. The problem in this case is that this user's sAMAccountName (a.fitzpatrick11137241) is 21 characters, but the limit is 20 characters.

  7. To fix this error, we'll edit the name generator we created in step 5, and add a Shorten: convert to first N characters conversion to Part 2 (last_name) of ng_sAMAccountName, with Argument (1) = 6.

    2023-07-12_11-32-52.jpg
  8. We'll also add the same conversion to ng_userPrincipalName, to keep it consistent with the ng_sAMAccountName.

    2023-07-12_11-37-57.jpg
  9. Click Save.

  10. We'll return to Scheduler > Overview and re-run the HR500 schedule.

  11. This time, the scheduler executes successfully.

    2023-07-12_11-44-57.jpg
Enable the schedule
  1. Go back to Scheduler > Overview.

  2. Select the Enabled checkbox for the HR500 schedule.

    2023-07-20_9-01-40.jpg

The schedule will automatically run at the next scheduled time.

Next: Step 10: Account update mapping