{"id":36418681,"url":"https://github.com/hdfg159/scheduler","last_synced_at":"2026-01-11T17:01:34.119Z","repository":{"id":57733409,"uuid":"222586957","full_name":"hdfg159/scheduler","owner":"hdfg159","description":"scheduler - 轻量级任务调度工具","archived":false,"fork":false,"pushed_at":"2020-11-20T14:12:29.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-16T15:01:40.685Z","etag":null,"topics":["delayed","delayed-job","delayed-queue","java","job","queue","schedule","task"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hdfg159.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-19T02:06:27.000Z","updated_at":"2024-05-16T15:01:40.693Z","dependencies_parsed_at":"2022-09-26T22:11:24.019Z","dependency_job_id":null,"html_url":"https://github.com/hdfg159/scheduler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hdfg159/scheduler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdfg159%2Fscheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdfg159%2Fscheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdfg159%2Fscheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdfg159%2Fscheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hdfg159","download_url":"https://codeload.github.com/hdfg159/scheduler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdfg159%2Fscheduler/sbom","scorecard":{"id":458803,"data":{"date":"2025-08-11","repo":{"name":"github.com/hdfg159/scheduler","commit":"bd0f2ee312f53d314ca150a2d78f5eee54f8f577"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 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"}}]},"last_synced_at":"2025-08-19T10:31:56.435Z","repository_id":57733409,"created_at":"2025-08-19T10:31:56.435Z","updated_at":"2025-08-19T10:31:56.435Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314259,"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":["delayed","delayed-job","delayed-queue","java","job","queue","schedule","task"],"created_at":"2026-01-11T17:01:34.037Z","updated_at":"2026-01-11T17:01:34.113Z","avatar_url":"https://github.com/hdfg159.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003eScheduler - 轻量级任务调度工具\u003c/p\u003e\n\n# 简介\n\n轻量级任务调度工具\n\n# 优点\n\n- 简易使用：简易创建方式和链式调用 API\n\n- 无依赖：不依赖其他任何组件\n\n- 动态：随时取消任务\n\n- 事件触发：目前支持按照每日时间点调度、周几时间点调度、简单调度(次数、频率、时间范围控制)、支持同一任务顺序执行和非顺序执行\n\n- 拓展性：可以继承 `AbstractTrigger` 默认继承类 或者 实现 `Trigger` 接口 实现自己的自定义触发器\n\n- 调度线程：支持自定义的线程池实现,按照任务执行消耗时间自动调度到不同线程池\n\n- 异常处理：支持针对每个定时器执行错误异常捕获后的自定义处理\n\n- 错误重试：支持针对每个定时任务出错后设置反复重试次数\n\n# 应用实例\n\n## 创建任务\n\n\u003e 创建从现在开始，1秒触发1次，一共执行10次的任务\n\n```\nTriggers.times(\"自定义触发器名称\", 10, 1, ChronoUnit.SECONDS, LocalDateTime.now(), \n        trigger -\u003e {\n            // 业务处理\n            System.out.println(\"hello world\");\n        })\n        .schedule();\n```\n\n更多创建方式可以查看 `Triggers` 工厂方法\n\n## 取消任务\n\n\u003e 通过 Trigger 的 `scheduleCancel()` 方法 直接取消\n\n```\nTrigger trigger = ... ;\ntrigger.scheduleCancel();\n```\n\n\u003e 通过 `ScheduleManager` 的 `cancel(String triggerName)` 根据触发器自定义名称进行取消\n\n```\nSchedulerManager.INSTANCE.cancel(\"自定义触发器名称\");\n```\n\n## 定制任务异常处理\n\n```\nTriggers.times(\"自定义触发器名称\", 10, 1, ChronoUnit.SECONDS, LocalDateTime.now(),\n        trigger -\u003e {\n            // 耗时业务处理\n            System.out.println(\"hello world\");\n        })\n        .afterExceptionCaught((trigger, throwable) -\u003e {\n            // 异常处理\n        })\n        .schedule();\n```\n\n## 同一任务顺序执行\n\u003e 默认创建任务`sequence`属性为`false`(即任务开始时马上放入下一个执行时间任务)\n```\nTriggers.times(\"自定义触发器名称\", 5, 1, ChronoUnit.SECONDS, LocalDateTime.now(),\n        trigger -\u003e {\n            // 业务处理\n            System.out.println(\"hello world\");\n        })\n        .sequence(true)\n        .schedule();\n```\n\n## 任务出错重试\n\n```\nTriggers.times(\"自定义触发器名称\", times, 1, ChronoUnit.SECONDS, LocalDateTime.now(),\n        trigger -\u003e {\n            throw new RuntimeException(\"出错了啊\");\n        })\n        .retry(3)\n        .schedule();\n```\n\n# License\n\nScheduler is under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhdfg159%2Fscheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhdfg159%2Fscheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhdfg159%2Fscheduler/lists"}