Creating and scheduling jobs

You can use IBM® Db2® Data Management Console to create and schedule jobs.

Procedure

To create and schedule jobs:

  1. Access the console.
  2. In the Databases page, click on the connection that you want to work on.
  3. From the navigation menu, select Jobs.
  4. Click Create job and select the type of job from the list.
    To create an instant job, select On-demand.
  5. In the Create new job page, complete the following steps:
    1. Enter the name of the job to be created.
    2. Optional: Provide a short description of the job.
    3. Define the SQL script that will run on the database.
    4. Optional: Click the Settings icon in the statement text box. The Script setting window displays.
      1. Enter the Db2 statement delimiter (; is the default value ).
      2. Click the Automatically commit each statement toggle button to set the option to Yes/No.
      3. Click Save.
    5. Optional: Enter email to receive notification to help you monitor the execution results of this job.
    6. Click Next.
      The Summary page displays.
    7. Review the job details and click Finish.
      The job is created and listed in the Jobs page where you can view the job definition, schedule detail and last run status.
  6. To create a scheduled job, select Scheduled
  7. In the Create new job page, complete the following steps:
    1. Enter the name of the job to be created.
    2. Optional: Provide a short description of the job.
    3. Define the SQL script that will run on the database.
    4. Optional: Click the Settings icon in the statement text box. The Script setting window displays.
      1. Enter the Db2 statement delimiter (; is the default value ).
      2. Click the Automatically commit each statement toggle button to set the option to Yes/No.
      3. Click Save.
    5. Optional: Enter email to receive notification to help you monitor the execution results of this job.
    6. Click Next.
    7. Specify the Start date, and Time, for scheduling the job.
    8. Click Next.
      The Summary page displays.
    9. Review the job details and click Finish.
      The job is created and listed in the Jobs page where you can view the job definition, schedule detail and last run status.
  8. To update job, click on the check box in front of the job name listed in the Jobs page and do one of the following:
    • To modify job settings, click Edit.
    • To create a copy of an existing job, click Copy.
    • To run the job, click Run. You can choose to run the job with existing credential or run with alternative credentials by providing the username and password.
    • To pause the schedule of the job, click Pause schedule.
    • To delete one or more jobs, click on the check boxes in front of the job name to select the jobs and click Delete.
  9. To cancel the selection, click Cancel.