{"id":36418014,"url":"https://github.com/fit2cloud/quartz-spring-boot-starter","last_synced_at":"2026-01-11T17:01:19.318Z","repository":{"id":47590574,"uuid":"112813073","full_name":"fit2cloud/quartz-spring-boot-starter","owner":"fit2cloud","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-31T05:48:04.000Z","size":102,"stargazers_count":22,"open_issues_count":1,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-31T07:27:54.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fit2cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-12-02T04:38:23.000Z","updated_at":"2025-03-18T08:48:50.000Z","dependencies_parsed_at":"2025-09-15T07:05:35.574Z","dependency_job_id":null,"html_url":"https://github.com/fit2cloud/quartz-spring-boot-starter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fit2cloud/quartz-spring-boot-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fit2cloud%2Fquartz-spring-boot-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fit2cloud%2Fquartz-spring-boot-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fit2cloud%2Fquartz-spring-boot-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fit2cloud%2Fquartz-spring-boot-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fit2cloud","download_url":"https://codeload.github.com/fit2cloud/quartz-spring-boot-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fit2cloud%2Fquartz-spring-boot-starter/sbom","scorecard":{"id":401592,"data":{"date":"2025-08-11","repo":{"name":"github.com/fit2cloud/quartz-spring-boot-starter","commit":"5ecbfe6773bd3036fb346ff8de72221bb843f047"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/mvn-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mvn-publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/fit2cloud/quartz-spring-boot-starter/mvn-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mvn-publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/fit2cloud/quartz-spring-boot-starter/mvn-publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/mvn-publish.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/fit2cloud/quartz-spring-boot-starter/mvn-publish.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"17 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-vmq6-5m68-f53m","Warn: Project is vulnerable to: GHSA-6v67-2wr5-gvf4","Warn: Project is vulnerable to: GHSA-pr98-23f8-jwxv","Warn: Project is vulnerable to: GHSA-rc42-6c7j-7h5r","Warn: Project is vulnerable to: GHSA-xf96-w227-r7c4","Warn: Project is vulnerable to: GHSA-4gc7-5j7h-4qph","Warn: Project is vulnerable to: GHSA-4wp7-92pw-q264","Warn: Project is vulnerable to: GHSA-564r-hj7v-mcr5","Warn: Project is vulnerable to: GHSA-9cmq-m9j5-mvww","Warn: Project is vulnerable to: GHSA-wxqc-pxw9-g2p8","Warn: Project is vulnerable to: GHSA-3mc7-4q67-w48m","Warn: Project is vulnerable to: GHSA-98wm-3w3q-mw94","Warn: Project is vulnerable to: GHSA-9w3m-gqgf-c4p9","Warn: Project is vulnerable to: GHSA-c4r9-r8fh-9vj2","Warn: Project is vulnerable to: GHSA-hhhw-99gj-p3c3","Warn: Project is vulnerable to: GHSA-mjmj-j48q-9wg2","Warn: Project is vulnerable to: GHSA-w37g-rhq8-7m4j"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T20:12:15.509Z","repository_id":47590574,"created_at":"2025-08-18T20:12:15.510Z","updated_at":"2025-08-18T20:12:15.510Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-11T17:00:39.682Z","updated_at":"2026-01-11T17:01:19.295Z","avatar_url":"https://github.com/fit2cloud.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quartz Spring Boot Starter\n\n- [前言](#前言)\n- [适用场景](#适用场景)\n- [日常使用](#日常使用)\n- [注意事项](#注意事项)\n\n## 前言\n\n- 本工程对刚接触FIT2CLOUD的同学，以及具有多年经验的老司机都有用处。本工程致力于做到*覆盖面广*（尽量包括一切重要的内容），*具体*（给出最常见的具体的例子），以及*简洁*（避免不必要的，或是可以在其他地方轻松查到的细枝末节）。每个技巧在特定情境下或是基本的，或是能显著节约时间。\n- 本文主要介绍工程的入门使用和注意事项。\n- 本文为 OS X 所写，并适用于 Windows 和 Linux 。\n\n## 适用场景\n- 本文基于`quartz`定时任务进行处理，旨在简化定时任务配置时的繁琐操作。\n\n## 日常使用\n- 工程必须是spring boot 工程否则无法使用。\n- 集群定时任务启动需要web容器和数据库的支持，各个数据库的`DDL`请自行下载[http://www.quartz-scheduler.org/downloads/](http://www.quartz-scheduler.org/downloads/) 使用时请注意表名大小写的问题。\n- 将下面的代码复制到`POM`文件中指定的位置。\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.fit2cloud\u003c/groupId\u003e\n    \u003cartifactId\u003equartz-spring-boot-starter\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.7\u003c/version\u003e\n\u003c/dependency\u003e\n```\n- 工程启动的配置文件`application.properties`中有定时任务的详细设置\n```properties\n# quartz enabled\nquartz.enabled=true # 是否开启quartz\nquartz.scheduler-name=testScheduler # 集群定时任务的唯一标识\nquartz.properties.org.quartz.jobStore.acquireTriggersWithinLock=true # 配置额外的properties\n```\n- 工程中代码只需要在 `public method` 中加上指定注解即可\n```java\n@Service\npublic class CustomDemoJob {\n    /**\n     * 可以直接写表达式，也可以写配置文件里的key\n     * 1/5 * * * * ?\n     */\n    @QuartzScheduled(cron = \"${cron.expression.demo}\", initialDelay = 1000 * 120)\n    public void cronJob() throws Exception {\n        System.out.println(Thread.currentThread() + \"cronJob start \" + new Date());\n        Thread.sleep(10 * 1000);\n        System.out.println(Thread.currentThread() + \"cronJob end \" + new Date());\n    }  \n    @QuartzScheduled(fixedDelay = 1000 * 5)\n    public void fixedDealyJob() throws Exception {\n        System.out.println(Thread.currentThread() + \"fixedDealyJob start \" + new Date());\n        Thread.sleep(10 * 1000);\n        System.out.println(Thread.currentThread() + \"fixedDealyJob end \" + new Date());  \n    }\n  \n    @QuartzScheduled(fixedRate = 1000 * 5, initialDelay = 1000 * 120)\n    public void fixedRateJob() throws Exception {\n        System.out.println(Thread.currentThread() + \"fixedRateJob start \" + new Date());\n        Thread.sleep(10 * 1000);\n        System.out.println(Thread.currentThread() + \"fixedRateJob end \" + new Date());   \n    }\n    /**\n    * 动态调整的定时任务\n    * @param a 自定义参数 基本类型必须是包装类型\n    * @param b 自定义参数 必须实现 java.io.Serializable 接口\n    */\n    public void task1(Integer a, String b) {\n        System.out.printf(\"%d, %s\\n\", a, b);\n    }\n}\n```\n- 测试动态调整的定时任务\n```java\n@RunWith(SpringRunner.class)\n@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)\npublic class TestQuartzManageService {\n    @Autowired\n    private QuartzManageService quartzManageService;\n\n    @Test\n    public void testAddJob() throws Exception {\n        quartzManageService.addJob(\"commonJob\", \"task1\", \"1/5 * * * * ?\", 3, \"test\");\n        Thread.sleep(1000 * 1000);\n    } \n    \n    @Test\n    public void testDeleteJob() throws Exception {\n        JobKey jobKey = quartzManageService.getJobKey(TriggerKey.triggerKey(\"commonJob\" + \".\" + \"task1\"));\n        quartzManageService.deleteJob(jobKey);\n    }\n}\n\n``` \n- 指定数据库连接池\n\n```java\n@Bean\n@QuartzDataSource // 指定 quartz 的数据库连接池\npublic DataSource optionalDataSource() throws Exception {\n    ComboPooledDataSource dataSource = new ComboPooledDataSource();\n    dataSource.setUser(env.getProperty(\"optional.rdb.user\"));\n    dataSource.setDriverClass(env.getProperty(\"optional.rdb.driver\"));\n    dataSource.setPassword(env.getProperty(\"optional.rdb.password\"));\n    dataSource.setJdbcUrl(env.getProperty(\"optional.rdb.url\"));\n    // todo 自行添加其他参数\n    return dataSource;\n}\n\n```\n\n## 注意事项\n- 本工程 `0.0.1` 版本不再维护\n- 本工程 `0.0.2` 版本基于JDK7编写，支持动态调整定时任务并指定参数执行修改了注解的名称和包路径\n- 本工程 `0.0.3` 版本基于JDK8编写，使用时请对照版本操作\n- 本工程 `0.0.4` 区分逻辑代码和 autoconfigure 配置\n- 本工程 `0.0.5` 可以配置 Thread pool count\n- 本工程 `0.0.6` 可以配置数据库连接池\n- 本工程 `0.0.7` 修改了自动配置非功能代码\n- 本工程 `0.0.8` 升级quartz依赖的版本\n- 本工程 `0.0.9` 可以传入自定义的`quartz.properties`\n- 本工程 `1.0.0` 扩展spring-boot-quartz，并将依赖版本提升至2.7.0\n- 本工程 `1.0.7` 使用@Autowired注入，兼容spring boot 3.x和2.x \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffit2cloud%2Fquartz-spring-boot-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffit2cloud%2Fquartz-spring-boot-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffit2cloud%2Fquartz-spring-boot-starter/lists"}