{"id":17932462,"url":"https://github.com/cheap-glitch/mi-cron","last_synced_at":"2025-10-13T22:44:51.257Z","repository":{"id":43148158,"uuid":"298354769","full_name":"cheap-glitch/mi-cron","owner":"cheap-glitch","description":"📆 A microscopic parser for standard cron expressions.","archived":false,"fork":false,"pushed_at":"2025-04-17T16:34:30.000Z","size":347,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T22:44:49.001Z","etag":null,"topics":["cron","cron-jobs","cron-schedule","crontab","node-module","tiny-modules","typescript-module"],"latest_commit_sha":null,"homepage":"https://npm.im/@cheap-glitch/mi-cron","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cheap-glitch.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"cheap-glitch"}},"created_at":"2020-09-24T17:55:53.000Z","updated_at":"2025-05-21T00:14:25.000Z","dependencies_parsed_at":"2024-06-18T18:33:37.819Z","dependency_job_id":"14568e4c-6cc9-4bd4-bf06-4e6ebe602631","html_url":"https://github.com/cheap-glitch/mi-cron","commit_stats":{"total_commits":49,"total_committers":2,"mean_commits":24.5,"dds":"0.020408163265306145","last_synced_commit":"a972c5b9a3643d3a6af9b9a8bb443af779c7c1a1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cheap-glitch/mi-cron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheap-glitch%2Fmi-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheap-glitch%2Fmi-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheap-glitch%2Fmi-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheap-glitch%2Fmi-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheap-glitch","download_url":"https://codeload.github.com/cheap-glitch/mi-cron/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheap-glitch%2Fmi-cron/sbom","scorecard":{"id":275271,"data":{"date":"2025-08-11","repo":{"name":"github.com/cheap-glitch/mi-cron","commit":"6cea27fdd38b5902e2277ec395c97731405a1f29"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"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":-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":"Code-Review","score":0,"reason":"Found 1/29 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":"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":"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":"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":"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: ISC 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 2 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":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"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-17T14:14:49.084Z","repository_id":43148158,"created_at":"2025-08-17T14:14:49.084Z","updated_at":"2025-08-17T14:14:49.084Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017141,"owners_count":26085984,"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-13T02:00:06.723Z","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":["cron","cron-jobs","cron-schedule","crontab","node-module","tiny-modules","typescript-module"],"created_at":"2024-10-28T21:27:25.633Z","updated_at":"2025-10-13T22:44:51.240Z","avatar_url":"https://github.com/cheap-glitch.png","language":"TypeScript","funding_links":["https://github.com/sponsors/cheap-glitch"],"categories":[],"sub_categories":[],"readme":"# 📆 mi-cron\n\n[![License](https://shields.io/github/license/cheap-glitch/mi-cron)](LICENSE)\n[![Latest release](https://shields.io/github/v/release/cheap-glitch/mi-cron?sort=semver\u0026label=latest%20release\u0026color=green)](https://github.com/cheap-glitch/mi-cron/releases/latest)\n[![Coverage status](https://shields.io/coveralls/github/cheap-glitch/mi-cron)](https://coveralls.io/github/cheap-glitch/mi-cron)\n\n**mi-cron** is a microscopic ([~1KB minified \u0026 gzipped](https://bundlephobia.com/result?p=@cheap-glitch/mi-cron))\nparser for [standard cron expressions](https://en.wikipedia.org/wiki/Cron#CRON_expression).\n\n## Features\n\n * Supports the complete standard cron syntax\n * Supports some convenient syntax extensions: @-shorthands (`@daily`) and steps (`*/10`)\n * Can compute the next scheduled date for a given expression\n * Tiny \u0026 dependency-free\n\n## Installation\n\n```\nnpm i @cheap-glitch/mi-cron\n```\n\n## Usage\n\n```javascript\nconst { parseCron } = require('@cheap-glitch/mi-cron');\n\nconsole.log(parseCron.nextDate('*/5 6-12 3 3 *').toUTCString());\n// Wed, 03 Mar 2021 06:00:00\n```\n\n## API\n\n### parseCron(exp: string): CronSchedule\n\nParses a standard cron expression. Supports:\n * globs (`*`)\n * ranges (`0-30`, `mon-fri`)\n * steps (`*/3`, `20-31/2`, `10/5`)\n * lists (`1,15`, `0-10,20-30/2`)\n * @-shorthands (`@weekly`)\n\nDoes NOT support:\n * `L`, `W`, `#`, `?`, `H`\n * year field\n * `@reboot`\n\nReturns an object with all possible values for each field (minutes, hours, days,\nmonths and days of the week), or `undefined` if the expression is invalid (wrong\nsyntax, unsupported instruction, impossible range, etc).\n\n```javascript\nconst { parseCron } = require('@cheap-glitch/mi-cron');\n\nconsole.log(parseCron('*/5 6-10 1,15 * wed'));\n// {\n// \tminutes:  [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55],\n// \thours:    [6, 7, 8, 9, 10],\n// \tdays:     [1, 15],\n// \tmonths:   [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],\n// \tweekDays: [3],\n// }\n```\n\n### parseCron.nextDate(exp: string | CronSchedule[, from: Date = new Date.now()]): Date\n\nTakes a cron schedule  or expression and returns the next  date that matches the\nschedule, or  `undefined` if the expression  is invalid. If given  a datetime as\nthe second argument, it will start  the computation from this time (otherwise it\nwill use the current datetime at the moment it's called).\n\n```javascript\nconst { parseCron } = require('@cheap-glitch/mi-cron');\n\nconsole.log(parseCron.nextDate('* * * * *', new Date('01 Jan 2020 00:00:00 GMT')).toUTCString());\n// Wed, 01 Jan 2020 00:01:00\n\n// Get the next five scheduled dates\nconst schedule = parseCron('@weekly');\nconst nextDate = new Date();\nfor (let i=0; i\u003c5; i++) {\n\tconsole.log(nextDate = parseCron.nextDate(schedule, nextDate));\n}\n```\n\n## Changelog\n\nSee the full changelog [here](https://github.com/cheap-glitch/devlint/releases).\n\n## Contributing\n\nContributions are welcomed! Please open an issue before submitting substantial changes.\n\n## Related\n\n * [crontab.guru](https://crontab.guru) – Interactive cron schedule editor\n * [Description of the crontab format](https://crontab.guru/crontab.5.html)\n * [Best practices for cron](https://www.endpoint.com/blog/2008/12/08/best-practices-for-cron)\n\n## License\n\nISC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheap-glitch%2Fmi-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheap-glitch%2Fmi-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheap-glitch%2Fmi-cron/lists"}