{"id":19347792,"url":"https://github.com/node-cron/cron-translate","last_synced_at":"2025-10-08T19:48:55.026Z","repository":{"id":125548923,"uuid":"151649530","full_name":"node-cron/cron-translate","owner":"node-cron","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-16T19:22:48.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-06T14:45:59.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/node-cron.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}},"created_at":"2018-10-04T23:47:32.000Z","updated_at":"2021-10-04T14:10:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bcefaff-f8db-4509-b01a-395311215acd","html_url":"https://github.com/node-cron/cron-translate","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/node-cron%2Fcron-translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-cron%2Fcron-translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-cron%2Fcron-translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-cron%2Fcron-translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-cron","download_url":"https://codeload.github.com/node-cron/cron-translate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240457995,"owners_count":19804489,"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":[],"created_at":"2024-11-10T04:18:04.011Z","updated_at":"2025-10-08T19:48:49.980Z","avatar_url":"https://github.com/node-cron.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cron-translate\n\nTranslate english to cron expressions\n\n## Usage\n\nInstall `cron-translate`\n\n```\nnpm install --save cron-translate\n```\n\n```js\nconst cronTranslate = require('cron-translate');\n\nlet cron = cronTranslate.toCron('every minute');\n```\n\n## Syntax\n\n`cron-translate` allows to use some fields and operators to compose the expressions that are translatable to cron expressions\n\n### Fields\n\nThe allowed fields are `second`, `minute`, `hour`, `day`, `month`, `week day`, or the plurals `seconds`, `minutes`, `hours`, `days`, `months`, `week days`.\n\n### Operators\n\n - **every** operator may be used in three ways:\n    - `every \u003cfield\u003e`: sets the field value to `*`. e.g: `every day`;\n    - `every \u003cvalue\u003e \u003cfield\u003e`: sets the field value to `*/\u003cvalue\u003e`. e.g: `every 10 minutes`;\n    - `every \u003cfield\u003e \u003cvalue\u003e`: sets the field value to `\u003cvalue\u003e`. e.g: `every hour 2`;\n - **on** operator may be use as the `every \u003cfield\u003e value`:\n    - `on \u003cfield\u003e \u003cvalue\u003e`: sets the field value to `\u003cvalue\u003e`. e.g: `on hour 2`;\n - **from to** operator is used to create ranges.\n    - `from \u003cfield\u003e \u003cvalue1\u003e to \u003cvalue2\u003e`: It sets the field value `\u003cvalue1\u003e-\u003cvalue2\u003e`. e.g: `from minute 2 to 10`;\n\n### Values\n\nThe allowed values are:\n - **Numbers**: for all fields.\n - **Names**: for months and week days, full names and abreviations are allowed. e.g: `monday` and `mon` are the same.\n\n\n## Examples\n\n### Every usage\n\n- `every second` is converted to `* * * * * *`;\n- `every minute` is converted to `0 * * * * *`;\n- `every hour` is converted to `0 0 * * * *`;\n- `every sunday` is converted to `0 0 0 * * sunday`; \n- `every january` is converted to `0 0 0 * january *`; \n- `every 2 minutes` is converted to `0 */2 * * * *`;\n- `every day 10` is converted to `0 0 0 10 * *`;\n\n### On usage\n\n- `on minute 2` is converted to `0 2 * * * *`;\n- `on sat` is converted to `0 0 0 * * sat`;\n\n### From to usage\n- `from minute 2 to 30` is converted to `0 2-30 * * * *`;\n\n### Combining expressions\n\nThe expressions may be combined to create complex cron expresions:\n\n- `every 10 minutes from hour 2 to 8` is converted to `0 */10 2-8 * * *`;\n- `every monday on hour 2 from minute 10 to 20` is converted to `0 10-20 2 * * monday`;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-cron%2Fcron-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-cron%2Fcron-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-cron%2Fcron-translate/lists"}