Giter Club home page Giter Club logo

hmcts.sscs-job-scheduler's Introduction

SSCS Job Scheduler

Build Status Codacy Badge Codacy Badge

The job scheduler library allows other services to schedule callbacks in the future. For example, scheduler can call back to a specified handler next week Sunday at 2am.

Getting started

Prerequisites

Developing

Unit tests

To run all unit tests execute the following command:

./gradlew test

Code quality checks

We use checkstyle and PMD.
To run all checks execute the following command:

./gradlew check

Job management

The service manages its clients' jobs with Quartz.
Applications importing this project as a JAR will be required to use their own database. This could be a PostgreSQL database for persisting those jobs. Also, Quartz can be configured to run in cluster mode, i.e. the load will be distributed among multiple nodes, each running different jobs.

Configuration Example


job.scheduler:
  quartzProperties:
    org.quartz:
      scheduler:
        instanceId: AUTO
      dataSource:
        jobscheduler:
          driver: org.postgresql.Driver
          URL: ${spring.datasource.url}
          user: ${spring.datasource.username}
          password: ${spring.datasource.password}
      jobStore:
        isClustered: true
        class: org.quartz.impl.jdbcjobstore.JobStoreTX
        driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
        dataSource: jobscheduler
      threadPool:
        class: org.quartz.simpl.SimpleThreadPool
        threadCount: 8

  retryPolicy:
    maxNumberOfJobExecutions: ${MAX_NUMBER_OF_JOB_EXECUTIONS:5}
    delayBetweenAttemptsInMs: ${DELAY_BETWEEN_JOB_ATTEMPTS_MS:15000}

Data security

As of now, job information is stored in an unencrypted form. This means that clients of this service must not include any sensitive information (tokens, passwords, personally identifiable information, etc.) in their requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

hmcts.sscs-job-scheduler's People

Contributors

bartlabno avatar chrisgrimble avatar divisathyan avatar doncem avatar fantasticjamieburns avatar jasonpaige avatar karoljastrzebski avatar lgonczar avatar nitinprabhu avatar oleg-hmcts avatar rkondratowicz avatar srochani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.