{"id":13436766,"url":"https://github.com/vmware-archive/cron-resource","last_synced_at":"2025-03-18T21:31:04.220Z","repository":{"id":34996640,"uuid":"39084455","full_name":"vmware-archive/cron-resource","owner":"vmware-archive","description":null,"archived":true,"fork":false,"pushed_at":"2020-02-29T01:06:48.000Z","size":10716,"stargazers_count":17,"open_issues_count":5,"forks_count":9,"subscribers_count":58,"default_branch":"master","last_synced_at":"2024-12-19T00:03:49.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"capsule8/capsule8","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vmware-archive.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":"2015-07-14T15:46:57.000Z","updated_at":"2023-03-22T06:07:40.000Z","dependencies_parsed_at":"2022-08-30T13:11:32.966Z","dependency_job_id":null,"html_url":"https://github.com/vmware-archive/cron-resource","commit_stats":null,"previous_names":["pivotal-cf-experimental/cron-resource"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fcron-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fcron-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fcron-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fcron-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmware-archive","download_url":"https://codeload.github.com/vmware-archive/cron-resource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244310525,"owners_count":20432554,"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-07-31T03:00:51.969Z","updated_at":"2025-03-18T21:31:01.027Z","avatar_url":"https://github.com/vmware-archive.png","language":"Go","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Crontab Resource\n\nImplements a resource that reports new versions when the current time\nmatches the crontab expression\n\n---\n## Update your pipeline\n\nUpdate your pipeline to include this new declaration of resource types. See the example pipeline yml snippet below or the Concourse docs for more details [here](https://concourse.ci/configuring-resource-types.html).\n```\n---\nresource_types:\n- name: cron-resource\n  type: docker-image\n  source:\n    repository: cftoolsmiths/cron-resource\n\nresources:\n  - name: 10-min-trigger\n    type: cron-resource\n    source:\n      expression: \"*/10 * * * *\"\n      location: \"America/New_York\"\n      fire_immediately: true\n```\n\n## Source Configuration\n\n* `expression`: *Required.* The crontab expression:\n\n    |field       | allowed values |\n    |-------------|----------------|\n    |minute       | 0-59 |\n    |hour         | 0-23 |\n    |day of month | 1-31 |\n    |month        | 1-12 (or names, see below) |\n    |day of week  | 0-7 (0 or 7 is Sun, or use names) |\n\n  e.g.\n\n    `0 23 * * 1-5` # Run at 11:00pm from Monday to Friday\n\n* `location`: *Optional.* Defaults to UTC. Accepts any timezone that\n  can be parsed by https://godoc.org/time#LoadLocation\n\n  e.g.\n\n  `America/New_York`\n\n  `America/Vancouver`\n\n* `fire_immediately`: *Optional.* Defaults to false. Immediately triggers the resource the first time it is checked.\n\n## Behavior\n\n### `check`: Report the current time.\n\nReturns `time.Now()` as the version only if a minute since we last\nfired matches the crontab expression. The first time the script runs\nit will fire if a minute in the last hour matches the crontab\nexpression.\n\n#### Parameters\n\n*None.*\n\n### `in`: Report the given time\n\nIf triggered by `check`, returns the original version as the resulting\nversion.\n\n#### Parameters\n\n1. *Output directory.* The directory where the in script will store\n   the requested version\n\n### `out`: Not supported.\n\n## Developer Notes\n\nYou can test the behavior by simulating Concourse's invocations. For example:\n\n```\n$ echo '{\"source\":{\"expression\":\"* * * * *\",\"location\":\"America/New_York\"}}' \\\n  | go run ./check\n[{\"time\":\"2016-08-19T10:15:27.183011117-04:00\"}]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmware-archive%2Fcron-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmware-archive%2Fcron-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmware-archive%2Fcron-resource/lists"}