10 Jobs

Jobs allow you to schedule the running of notebooks. On the Jobs page, you can create jobs, duplicate jobs, start and stop jobs, delete jobs, and monitor job status by viewing job logs, which are read-only notebooks.

10.1 About Jobs

The Jobs page lists all the jobs created, along with the job name, notebook, owner of the job, last start date, next run date, status, and schedule.

You can create multiple jobs for a notebook. You can run a job only when the notebook associated with it is not running.

Note:

You can run multiple jobs at the same time, but you must start them individually, and not in bulk.
This is the Jobs page. You can perform the following tasks:

Note:

You can perform these actions only on jobs created by you. For jobs created by another user, these options are disabled. You must have the OML_SYS_ADMIN role to perform these actions—Delete, Enable, Disable on jobs created by another user.
  • Create: Click Create to create a new job to schedule your notebook.

  • Edit: You can edit the metadata of any job listed on the Jobs page. Select the job you want to edit and then click Edit.

  • Delete: Select the job you want to delete and click Delete. You must have the OML_SYS_ADMIN to delete a job created by another user.

  • Duplicate: You can create a copy of an existing job listed on the Jobs page. Click Duplicate to make a copy of the selected job.

  • Stop: Click Stop to end a job that is currently running.

  • Start: The Start button is enabled only for jobs that are in Scheduled status. Click Start to start a scheduled job. You can start multiple jobs at the same time, but you must start them individually, and not in bulk. The Start option is not applicable for the following conditions:
    • Jobs that have already completed its scheduled run cannot be re-started.
    • Jobs that have failed more than the allowed number of times, and are currently in Broken status, cannot be re-started.
  • More: Under More, you have the options to enable or disable a job.
    • Enable: Select a job that you want to enable, click More and then click Enable. You must have the OML_SYS_ADMIN to enable a job created by another user.
    • Disable: Select a job that you want to disable, click More and then click Disable. You must have the OML_SYS_ADMIN to disable a job created by another user.

10.2 Create Jobs to Schedule Notebooks

You can create jobs to schedule your notebook with the notebook scheduling settings.

To create jobs, enter the following details in the Create Jobs dialog box:
  1. On the Jobs page, click Create. The Create Jobs dialog opens.
  2. In the Name field, enter a name for the job. The number of characters in the job name must not exceed 128 bytes.
  3. In the Notebook field, click the search icon to select a notebook to create a job.

    Note:

    Only notebooks that are owned by the user or shared are available for selection.
  4. In the Start Date field, click the date-time editor to set the date and time for your job to commence. Based on the selected date and time, the next run date is computed.
  5. Optionally, in the Repeat section, select:
    • Frequency: To set the repeat settings and frequency. You can set the frequency in minutes, hours, days, week, and month.
    • Custom: To customize the job settings.
  6. Expand the Advanced Settings section, select one or more of the following options:

    Figure 10-3 Advanced Settings in Create Jobs dialog



    • Send Notifications: Select this option to send email notifications to the specified users' email addresses about the selected events for the job.

      Note:

      Email server must be set up for notifications to work.
    • Email Address: Enter the email ID of the users. By default, you can enter three email IDs, separated by comma. To send emails to more users, contact your Administrator.

      Note:

      The email notification feature is only available to the paid customer. This feature is not available in the free trial account.
    • Events: Select the event for which you want to send the notification. The supported job events are:
      • JOB_START: Indicates that the job has started for the first time, or a job was started on a retry attempt.
      • JOB_SUCCEEDED: Indicates that the job has completed successfully.
      • JOB_FAILED: Indicates that the job resulted in an error, or was not able to run due to process death or database shutdown.
      • JOB_BROKEN: Indicates that the job is marked broken after retrying unsuccessfully. It also indicates failed job run after 16 attempts.
      • JOB_COMPLETED: Indicates that the job has a status of COMPLETED after it has reached its maximum number of runs or its end date.
      • JOB_STOPPED: Indicates that the job has terminated normally after a soft stop or hard stop was issued.
    • Maximum Number of Runs: To specify the maximum number of times the job must run before it is stopped. When the job reaches the maximum run limit, it will stop.

      Figure 10-4 Advanced Settings-2 in Create Jobs dialog



    • Timeout in Minutes: To specify the maximum amount of time a job should be allowed to run.

    • Maximum Failures Allowed: To specify the maximum number of times a job can fail on consecutive scheduled runs. When the maximum number of failures is reached, the next run date column in the Jobs UI will show an empty value to indicate the job is no longer scheduled to run. The Status column may show the status as Failed.

    • Automatic Retry: Select this option if you want the job to restart in case the job fails.
  7. Click OK.

10.3 View Job Logs

You can view the historical logs of any particular job in the Job Log interface.

You can view a log in the read-only Notebook. To view job logs:
  1. On the Jobs page, click on the job name for which you want to view the job logs. The logs for the specific job are displayed on the job log page.
  2. The job logs page lists all the logs for the specific job you clicked. It displays the date, status, details of the error (if any), and the duration of the job run. For every job that fails, the Detail column lists the error message with a link. Click on the error link to view the complete error message. The old job logs are preserved and are accessible through the date column. Note the total number of logs are limited to 50. The metadata are available as clickable links under the Date column on this page, as shown in the screenshot here.
  3. The complete error is displayed on a separate pane that slides in. Click X to close the pane.

    Figure 10-7 Job log details and metadata



  4. Click Back to Jobs on the job log page to return to the Jobs page.