{"id":20727242,"url":"https://github.com/hmcts/job-scheduler","last_synced_at":"2025-09-09T14:36:07.270Z","repository":{"id":81603097,"uuid":"112468390","full_name":"hmcts/job-scheduler","owner":"hmcts","description":"Job scheduler for hmcts","archived":false,"fork":false,"pushed_at":"2023-09-01T11:36:54.000Z","size":301,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-30T02:33:22.802Z","etag":null,"topics":["flyway","postgresql","quartz","scheduler","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmcts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-29T11:41:40.000Z","updated_at":"2023-08-30T08:21:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4f52703-8581-4a7b-8d43-98fa64c84bb3","html_url":"https://github.com/hmcts/job-scheduler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fjob-scheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fjob-scheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fjob-scheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fjob-scheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmcts","download_url":"https://codeload.github.com/hmcts/job-scheduler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250496283,"owners_count":21440227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flyway","postgresql","quartz","scheduler","spring-boot"],"created_at":"2024-11-17T04:29:41.669Z","updated_at":"2025-04-23T18:51:49.624Z","avatar_url":"https://github.com/hmcts.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Job Scheduler\n[![Build Status](https://travis-ci.org/hmcts/job-scheduler.svg?branch=master)](https://travis-ci.org/hmcts/job-scheduler)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/db1d536343474c40967ab9b236044e1d)](https://www.codacy.com/app/HMCTS/job-scheduler)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/db1d536343474c40967ab9b236044e1d)](https://www.codacy.com/app/HMCTS/job-scheduler)\n\nThe job scheduler micro service allows other services to schedule http actions in the future. For example, scheduler\ncan send a POST request to a specified url every Sunday at 2am.\n\n![diagram](docs/diagram.png)\n\n## Getting started\n\n### Prerequisites\n- [JDK 8](https://java.com)\n\n### External service dependencies\n\nIn order to validate service auth tokens, Job Scheduler sends http requests to S2S Service.  \nURL to S2S can be configured via the config file or using environment variables.  \nS2S Service is currently not open source.\n\n### Running\nRun the application by executing:\n```bash\n./gradlew bootRun\n```\n\nIn order to run the application (with its database) in Docker, execute:\n```bash\n./bin/run-in-docker.sh\n```\n\nFor more information:\n\n```bash\n./bin/run-in-docker.sh -h\n```\n\nScript includes bare minimum environment variables necessary to start database and api instances. Whenever any variable is changed or any other script regarding docker image/container build, the suggested way to ensure all is cleaned up properly is by this command:\n\n```bash\ndocker-compose rm\n```\n\nIt clears stopped containers correctly. Might consider removing clutter of images too, especially the ones fiddled with:\n\n```bash\ndocker images\n\ndocker image rm \u003cimage-id\u003e\n```\n\nThere is no need to remove postgres and java images.\n\n## API documentation\nApi documentation is provided with Swagger:\n- json spec: [http://localhost:8484/v2/api-docs](http://localhost:8484/v2/api-docs)\n- swagger UI: [http://localhost:8484/swagger-ui.html](http://localhost:8484/swagger-ui.html)\n\n## Developing\n\n### Unit tests\nTo run all unit tests execute the following command:\n```bash\n./gradlew test\n```\n\n### Code quality checks\nWe use [checkstyle](http://checkstyle.sourceforge.net/) and [PMD](https://pmd.github.io/).  \nTo run all checks execute the following command:\n```bash\n./gradlew check\n```\n\n## Job management\n\nThe service manages its clients' jobs with [Quartz](http://www.quartz-scheduler.org/).  \nIt uses a PostgreSQL database for persisting those jobs. Also, Quartz is configured\nto run in cluster mode, i.e. the load will be distributed among multiple nodes, each\nrunning different jobs.\n\n## Data security\n\nAs of now, job information is stored in an unencrypted form. This means that clients\nof this service must not include any sensitive information (tokens, passwords, personally\nidentifiable information, etc.) in their requests.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmcts%2Fjob-scheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmcts%2Fjob-scheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmcts%2Fjob-scheduler/lists"}