{"id":16255296,"url":"https://github.com/qubyte/rubidium","last_synced_at":"2025-10-26T02:13:55.983Z","repository":{"id":14741684,"uuid":"17462686","full_name":"qubyte/rubidium","owner":"qubyte","description":":hourglass: A small unique job scheduler.","archived":false,"fork":false,"pushed_at":"2024-06-16T09:55:44.000Z","size":535,"stargazers_count":7,"open_issues_count":1,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T13:41:17.782Z","etag":null,"topics":["atd","cron","javascript","scheduling"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/qubyte.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2014-03-06T01:58:41.000Z","updated_at":"2023-02-07T23:32:46.000Z","dependencies_parsed_at":"2023-11-24T14:49:00.712Z","dependency_job_id":null,"html_url":"https://github.com/qubyte/rubidium","commit_stats":{"total_commits":200,"total_committers":5,"mean_commits":40.0,"dds":0.585,"last_synced_commit":"26b2c95f91cfe66f3dbabfb57b1b88da0271725f"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/qubyte/rubidium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qubyte%2Frubidium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qubyte%2Frubidium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qubyte%2Frubidium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qubyte%2Frubidium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qubyte","download_url":"https://codeload.github.com/qubyte/rubidium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qubyte%2Frubidium/sbom","scorecard":{"id":755510,"data":{"date":"2025-08-11","repo":{"name":"github.com/qubyte/rubidium","commit":"4ad95933612336f605bb7e23a71b7f521c362fff"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/16 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.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":"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":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/qubyte/rubidium/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/qubyte/rubidium/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/qubyte/rubidium/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/qubyte/rubidium/ci.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand 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":"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":"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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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 'main'"],"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 18 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":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5"],"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-22T21:34:56.326Z","repository_id":14741684,"created_at":"2025-08-22T21:34:56.326Z","updated_at":"2025-08-22T21:34:56.326Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281047743,"owners_count":26435124,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["atd","cron","javascript","scheduling"],"created_at":"2024-10-10T15:29:21.514Z","updated_at":"2025-10-26T02:13:55.944Z","avatar_url":"https://github.com/qubyte.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rubidium\n\nRubidium is a one-time task emitter, inspired by the unix `at` utility. This\nmodule is a minimal implementation. It exports a constructor. Instances of the\nconstructor are event emitters, with methods to add and remove job\nspecifications. A job consists of a due time and a message.\n\nRubidium is built upon the use of `setTimeout`, so [the usual warnings apply](http://nodejs.org/api/timers.html#timers_settimeout_callback_delay_arg).\nThat said, Rubidium creates a fresh timeout after each job is emitted, so it is\nself-correcting to within the resolution of a timer.\n\nRubidium is built on\n[vetebrate-event-emitter](https://github.com/qubyte/vertebrate-event-emitter),\nwhich makes it robust against memory leaks. It has been bundled for you with\nits dependencies, so Rubidium has no dependencies in production.\n\n## Usage\n\nA brief example is given below. See the examples directory for some more\ninteresting examples, including wrapping a rubidium instance in an HTTP server,\nand persisting a rubidium instance over app restarts.\n\n```javascript\nimport Rubidium from 'rubidium';\n\nvar rb = new Rubidium();\n\nrb.on('job', job =\u003e console.log(job.message));\n\n// Add a job to be emitted in 5 seconds time.\nrb.add({ time: Date.now() + 5000, message: '5 seconds have passed.' });\n\n// Add a job to be emitted in one day.\nrb.add({ time: Date.now() + 1000 * 60 * 60 * 24, 'One day as passed.' });\n```\n\nYou could of course do this with vanilla timeouts. A rubidium instance allows\nyou to do it all with a single timeout. It also works around the maximum timeout\nlength, so you can have a job more than about 25 days into the future.\n\n## API\n\n`Rubidium` extends\n[`vertebrate-event-emitter`](https://github.com/qubyte/vertebrate-event-emitter),\nso please see the docs for that for the base API around events (methods like\n`on`, `off` etc.)\n\n### `var rb = new Rubidium()`\n\nConstruct a new Rubidium instance.\n\n### `var hasJobs = rb.hasPendingJobs`\n\nA boolean property. True when there are jobs remaining in the queue.\n\n### `var job = rb.add({ time, message, [uuid] }, silent)`\n\nAdd a job. The `time` must be a `Date` instance or a timestamp integer (like\n`Date.now()`) representing the time for the job to be emitted. This method\nreturns a job with a uuid property that may be used to find or remove the job\nfrom the queue.\n\nWhen `uuid` is in the spec, it will be copied into the job. This is useful for\nreviving a persisted queue (see the section on persistence below). In general,\nyou should not be setting this.\n\nWhen `silent` is true, this `addJob` event will not be emitted. This is useful\nfor reviving a persisted queue.\n\n### `var job = rb.remove(uuid, silent)`\n\nRemove a job from a Rubidium instance with the job uuid. This function returns a\njob if the job existed and was removed, or `undefined` if the job did not exist.\nWhen `silent` is true, the `removeJob` event will not be emitted.\n\n### `var job = rb.find(uuid)`\n\nGet a job from the Rubidium instance with the job uuid. Returns `undefined` when\nno matching job is found.\n\n### `rb.clear(silent)`\n\nClear all pending jobs. When silent is true, the `clearJobs` event will not be\nemitted.\n\n### Event: `'job'`\n\nListeners on the `'job'` event receive a job object containing `time` and\n`message` fields, where `time` is an integer.\n\n### Event: `'addJob'`\n\nThis event is emitted when a new job is added. The job object is passed as an\nargument to listeners on this event.\n\n### Event: `'removeJob'`\n\nThis event is emitted when when a job is removed. The job object is passed as an\nargument to listeners on this event. When the `clear` method is used, this event\nis emitted for every job.\n\n### Event: `'clearJobs'`\n\nThis event is emitted when all jobs for a Rubidium instance are cleared.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqubyte%2Frubidium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqubyte%2Frubidium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqubyte%2Frubidium/lists"}