1. Open the Scheduler by clicking the Scheduler button from the toolbar.
  2. Click File > New Job from the menu in the top of the screen, or click the New Job button from the toolbar.

  3. Enter the required details in the Job Definition window.

    Refer to Creating a Job for more details on how to create a new job.

  4. Once the job has been created, click the All Jobs button from the toolbar. The newly created job is now displayed in the Scheduler window.

To create a job within a job

It is possible to schedule one job from another job. There are however some limitations and rules that must be understood when doing this.

  1. A job that is called from another job is only ever allocated one thread. All tasks within the called job will therefore run sequentially.
  2. A job can only have one running iteration. Therefore, a called job is blocked if that job is already running independently or as part of another job.
  3. Any job dependencies for the called job are ignored. The parent's job dependencies are the only ones that are used.
  4. A called job essentially runs as a separate job, so that if it fails both it and the parent job shows in a failed state. Once the problem is fixed, the parent job should be restarted which restarts the called job.

To create a job dependency

It is possible to make a job dependent on another job, using the Dependent On field in the Job Definition window.

Click the Add Parent Job button.

In the window that appears, select the Parent Job from the drop-down list. In our case, we choose the job Shared Dimensions Daily Refresh.

The Maximum Time to Look Back for the Parent Job Completion field prevents older iterations of the parent job from being identified as a completion. In our example, we are starting both jobs at 3 am, so we don't need to look too far back to ensure that the dimension refresh has run. We have therefore set the look-back minutes to 60 to allow for any delays in starting this job.

The Maximum Time to Wait for the Parent Job to Complete specifies how long to await a successful completion of the parent job. In our example, we know that the dimension refresh only takes a few minutes, but we should allow for the occasional slow network or resource drains making the dimension refresh take longer; so we have set the maximum wait to 20 minutes. This means that our job will wait 20 minutes from its own scheduled start time for the parent job to complete.

The check box failing if the parent job is not complete in time prevents this job from running if the parent job (dimension refresh) does not complete successfully.  We do not want the transactional data in our fact deliveries to be flagged with ‘Unknown’ dimensional item(s), so we can leave this check box selected to ensure that this job does not run.

Click Add.

Clearing the check box to fail if the parent fails will simply ensure that this job waits for the completion of the dimension refresh, and irrespective of the dimensions refresh success or failure, it starts.

Click OK to link this data job to the parent dimensional job. In this way, the job Enterprise Reporting Daily Refresh cannot run until the parent job Shared Dimensions Daily Refresh has completed successfully; thus the facts will have the latest dimensional keys associated with them.

  • No labels