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
Go to Scheduler > Overview.
Click Add.
For the Type, select sync.
Enter a Name.
For this example, we'll call it
HR500_AD
, following the convention SourceSystem.Click Save.
Configure the schedule
For this example, we'll turn off the Evaluate toggle, which is used to send email notifications in advance of scheduled runs.
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.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.
Click Save.
Go to the Schedule tab.
Enable the Scheduling Enabled checkbox.
We'll configure the schedule to run at 2:15am, M-F.
We'll click Calculate Instances to confirm the upcoming time/dates that the schedule will execute.
Click Save.
Perform an initial manual run & troubleshoot errors
Go back to Scheduler > Overview.
Click Manual Run for the HR500_AD schedule.
In this case, the schedule fails in the middle of execution.
We'll click the red error row in the Log pane to view more details.
Here, we can see that the error occurred for the employee Anita Fitzpatrick.
We'll also click this error row to further drill down.
The problem in this case is that this user's sAMAccountName (a.fitzpatrick11137241) is 21 characters, but the limit is 20 characters.
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.
We'll also add the same conversion to ng_userPrincipalName, to keep it consistent with the ng_sAMAccountName.
Click Save.
We'll return to Scheduler > Overview and re-run the HR500 schedule.
This time, the scheduler executes successfully.
Enable the schedule
Go back to Scheduler > Overview.
Select the Enabled checkbox for the HR500 schedule.
The schedule will automatically run at the next scheduled time.