{"id":37105315,"url":"https://github.com/jdav-dev/gocron","last_synced_at":"2026-01-14T12:42:21.590Z","repository":{"id":57530596,"uuid":"81411781","full_name":"jdav-dev/gocron","owner":"jdav-dev","description":"Generates CRON expressions given an interval.","archived":true,"fork":false,"pushed_at":"2020-04-18T20:57:01.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-17T14:53:26.384Z","etag":null,"topics":["cron-expression","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/jdav-dev.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}},"created_at":"2017-02-09T05:14:51.000Z","updated_at":"2024-08-09T19:14:00.000Z","dependencies_parsed_at":"2022-09-13T03:12:19.494Z","dependency_job_id":null,"html_url":"https://github.com/jdav-dev/gocron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jdav-dev/gocron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdav-dev%2Fgocron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdav-dev%2Fgocron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdav-dev%2Fgocron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdav-dev%2Fgocron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdav-dev","download_url":"https://codeload.github.com/jdav-dev/gocron/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdav-dev%2Fgocron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["cron-expression","golang"],"created_at":"2026-01-14T12:42:20.909Z","updated_at":"2026-01-14T12:42:21.579Z","avatar_url":"https://github.com/jdav-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Golang CRON Expression Generator\n================================\n[![Build Status](https://travis-ci.org/jdav-dev/gocron.svg?branch=master)](https://travis-ci.org/jdav-dev/gocron)\n\nTakes a `time.Duration` and returns the closest CRON expression to fit that\ninterval.  Can also offset that CRON expression with by a second\n`time.Duration`.  Returned expressions fit the standard/default CRON\nimplementation.\n\nUsage\n-----\nImport:\n```golang\nimport (\n\t\"time\"\n\n\t\"github.com/jdav-dev/cron\"\n)\n```\n\nEvery minute (minimum interval):\n```golang\ns, _ := gocron.IntervalToSchedule(time.Minute)\ns.Expression()\n```\nreturns `* * * * *`\n\nEvery 15 minutes:\n```golang\ns, _ := gocron.IntervalToSchedule(15 * time.Minute)\ns.Expression()\n```\nreturns `0,15,30,45 * * * *`\n\nOnce a year (maximum interval):\n```golang\ns, _ := gocron.IntervalToSchedule(365 * 24 * time.Hour)\ns.Expression()\n```\nreturns `0 0 1 1 *`\n\nEvery 15 minutes, offset by 5 minutes:\n```golang\ns, _ := gocron.OffsetIntervalToSchedule(15 * time.Minute, 5 * time.Minute)\ns.Expression()\n```\nreturns `5,20,35,50 * * * *`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdav-dev%2Fgocron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdav-dev%2Fgocron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdav-dev%2Fgocron/lists"}