{"id":20263636,"url":"https://github.com/springerpe/cron-script-repository-boshrelease","last_synced_at":"2025-10-29T04:41:57.468Z","repository":{"id":80987238,"uuid":"175785259","full_name":"SpringerPE/cron-script-repository-boshrelease","owner":"SpringerPE","description":"A BOSH release that is intended to be like a repository for your cronjob scripts","archived":false,"fork":false,"pushed_at":"2019-03-22T15:27:40.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T04:44:36.565Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/SpringerPE.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":"2019-03-15T09:04:29.000Z","updated_at":"2019-03-22T15:27:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"e640091a-d63c-4d3a-a263-682d84eb3a34","html_url":"https://github.com/SpringerPE/cron-script-repository-boshrelease","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/SpringerPE%2Fcron-script-repository-boshrelease","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fcron-script-repository-boshrelease/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fcron-script-repository-boshrelease/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fcron-script-repository-boshrelease/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpringerPE","download_url":"https://codeload.github.com/SpringerPE/cron-script-repository-boshrelease/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241731744,"owners_count":20010781,"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-14T11:35:47.771Z","updated_at":"2025-10-29T04:41:52.423Z","avatar_url":"https://github.com/SpringerPE.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bosh-cron-script-repository\nA BOSH release that is intended to be like a repository for your cronjob scripts\n\n# Intro\nThis release gives the option to add scripts as cronjobs, each with its own schedules.\n\nWe are aware that there are other options (like https://github.com/cloudfoundry-community/cron-boshrelease), but they\ndon't allow to properly modularize the cron scripts.\nThis means that they are not made to manage cron scripts if the scripts are too long.\n\nThis release copies the scripts under `jobs/cronscript/templates/scripts` into the BOSH instance where it is being\ndeployed and adds an entry to a cron-schedule file so that they can be executed.\n\n# How to use\nIn order to use this release, you will need to manually add the scripts into it.\n\nFor that, there are 3 steps:\n\n1) Add the scripts to the `jobs/cronscript/templates/scripts` folder\n2) Add the schedules to the `jobs/cronscript/templates/schedules` folder\n3) Add a new property to the spec file.\n\n## Adding the scripts\nAll you need to do is to copy your script into the `jobs/cronscript/templates/scripts` folder.\nThen the release will copy the scripts into `$JOB_DIR/scripts` and make them executable.\n\n## Scheduling the cron jobs\nTo add cron entry with your script, you will need to create a file under `jobs/cronscript/templates/schedules` with \n*the same name* as your script. This file can only contain 1 line, which will be the cron schedule that you want for\n  that cron job.\n\nIf you want to make that configurable (which will probably will be a good idea), you need to add an entry to the spec\nfile with your chron schedule.\nThen you can read that property in the schedule file, like:\n`\u003c%= p(\"schedules.hello\") %\u003e`\n\n## Creating the new bosh release\n\nAfter adding the scripts and the cron schedules to the release, you will need to create your own version of the release.\n\nFor that, all you need to do is:\n\n* execute `bosh create-release --force` from within the release folder in order to create a new version of the release\n* `bosh upload-release` to upload the release into BOSH. This is the step that allows you to use your own release\n  version\n\n# Adding the release into your deployment\nTo add the release into your deployment, just create an operation file like\n```\n- type: replace\n  path: /releases/-\n  value: \n    name: cron-script-repository\n    version: YOUR CUSTOM VERSION\n    sha1: YOUR CUSTOM SHA1\n\n- type: replace\n  path: /instance_groups/name=kibana?/jobs/-\n  value: \n    name: cronscript\n    release: cron-script-repository\n    properties:\n      schedules:\n        hello: '11 * * * *'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringerpe%2Fcron-script-repository-boshrelease","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringerpe%2Fcron-script-repository-boshrelease","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringerpe%2Fcron-script-repository-boshrelease/lists"}