Skip to content

Scheduled Job - Database ​

Overview ​

This section shows how to create the database table for the Scheduled Job application.

Steps ​

Database Table ​

  1. Navigate to the Database Perspective.

  2. In the Statements View enter the following script:

    sql
    create table LOG_EVENTS (
        LOG_ID integer primary key auto_increment,
        LOG_SEVERITY varchar(16),
        LOG_MESSAGE varchar(120),
        LOG_TIMESTAMP timestamp
    );
  3. Press the Run icon to execute the SQL script.

    Keyboard Shortcut

    Press ++ctrl+x++ for Windows, ++cmd+x++ for macOS to execute the SQL script.

    Note: You can execute all or part of the SQL scripts in the SQL View by making a selection and pressing the Run icon or the keyboard shortcut.

  4. Press the Refresh button to see the LOG_EVENTS table.

    Database

Table Content ​

  1. Right click on the LOG_EVENTS table and select Show Contents.

  2. The table data would be displayed in the Result View.

  3. As the table is empty, there should be no data:

    Table Content

Next Steps ​

Section Completed

After completing the steps in this tutorial, you would:

Continue to the Job Handler section to create a Job Handler, that would be executed by the Scheduled Job.

Note: The complete content of the Scheduled Job tutorial is available at: https://github.com/dirigiblelabs/tutorial-scheduled-job-project:::

Released under the EPL-2.0 License.