{"id":15481435,"url":"https://github.com/litencatt/crntb","last_synced_at":"2026-02-15T03:03:06.715Z","repository":{"id":48823073,"uuid":"136019580","full_name":"litencatt/crntb","owner":"litencatt","description":"Crontab format translation tool.","archived":false,"fork":false,"pushed_at":"2021-07-09T20:25:24.000Z","size":81,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-30T18:50:30.195Z","etag":null,"topics":["crontab","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/litencatt.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":"2018-06-04T12:09:33.000Z","updated_at":"2018-10-13T03:58:29.000Z","dependencies_parsed_at":"2022-09-13T11:00:59.611Z","dependency_job_id":null,"html_url":"https://github.com/litencatt/crntb","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/litencatt/crntb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litencatt%2Fcrntb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litencatt%2Fcrntb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litencatt%2Fcrntb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litencatt%2Fcrntb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litencatt","download_url":"https://codeload.github.com/litencatt/crntb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litencatt%2Fcrntb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29466925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"online","status_checked_at":"2026-02-15T02:00:07.449Z","response_time":118,"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":["crontab","ruby"],"created_at":"2024-10-02T05:04:27.820Z","updated_at":"2026-02-15T03:03:06.693Z","avatar_url":"https://github.com/litencatt.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Inspired by http://crontab.homecoded.com/\n\nConvert crontab lines to other format.\n\n## Install\n```\n$ git clone https://github.com/litencatt/crntb\n$ cd /path/to/crntb\n$ bundle install --path vendor/bundle\n```\n\n## Usage\nConvert a line.\n\n### Hash\n`.to_h`\n```rb\n$ bin/console\n[1] pry(main)\u003e Crntb.parse(\"* * * * * foo.sh\").to_h\n=\u003e {:minute=\u003e\"*\", :hour=\u003e\"*\", :day_of_month=\u003e\"*\", :month=\u003e\"*\", :day_of_week=\u003e\"*\", :command=\u003e\"foo.sh\"}\n```\n\n### JSON\n`.to_json`\n```\n[1] pry(main)\u003e Crntb.parse(\"* * * * * foo.sh\").to_json\n=\u003e \"{\\\"minute\\\":\\\"*\\\",\\\"hour\\\":\\\"*\\\",\\\"day_of_month\\\":\\\"*\\\",\\\"month\\\":\\\"*\\\",\\\"day_of_week\\\":\\\"*\\\",\\\"command\\\":\\\"foo.sh\\\"}\"\n\n```\n\n### To Chef cron resource DSL\n`to_chef`\n```\n[2] pry(main)\u003e puts Crntb.parse(\"* * * * * foo.sh\").to_chef\ncron 'exec_foo.sh' do\n  minute  \"*\"\n  hour    \"*\"\n  day     \"*\"\n  month   \"*\"\n  weekday \"*\"\n  command \"foo.sh\"\nend\n=\u003e nil\n```\n\n### To Whenever DSL\n`.to_whenever`\n```\n[3] pry(main)\u003e puts Crntb.parse(\"* * * * * foo.sh\").to_whenever\nevery '* * * * *' do\n  command \"foo.sh\"\nend\n=\u003e nil\n```\n\n### To English\n`.to_eng`\n```\n[2] pry(main)\u003e Crntb.parse(\"* * * * * foo.sh\").to_eng\n=\u003e \"every minute of every hour of every day, Execute \\\"foo.sh\\\"\"\n```\n\n### To Markdown\n`.to_md`\n```\n[3] pry(main)\u003e Crntb.parse(\"* * * * * foo.sh\").to_md\n=\u003e \"## Summary\\nevery minute of every hour of every day, Execute \\\"foo.sh\\\"\\n\\n### Command\\n```\\nfoo.sh\\n```\\n### Fields\\n\\n| fields | minute | hour |day_of_month | month | day_of_week |\\n| --- | :---: | :---: | :---: | :---: | :---: |\\n| value | *  | * | * | * | * |\\n\"\n```\n\n---\n\n## Summary\nevery minute of every hour of every day, Execute \"foo.sh\"\n\n### Command\n```\nfoo.sh\n```\n### Fields\n\n| fields | minute | hour |day_of_month | month | day_of_week |\n| --- | :---: | :---: | :---: | :---: | :---: |\n| value | *  | * | * | * | * |\n\n---\n\n### Convert crontabs written in a file.\n```rb\n$ bin/console\n[1] pry(main)\u003e Crntb.parse_file(\"./sample.cron\").map{|e| pp e.to_json }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitencatt%2Fcrntb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitencatt%2Fcrntb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitencatt%2Fcrntb/lists"}