https://github.com/cloudfoundry-community/cron-boshrelease
A generic crontab-generating boshrelease
https://github.com/cloudfoundry-community/cron-boshrelease
Last synced: 9 months ago
JSON representation
A generic crontab-generating boshrelease
- Host: GitHub
- URL: https://github.com/cloudfoundry-community/cron-boshrelease
- Owner: cloudfoundry-community
- License: mit
- Created: 2016-03-04T22:28:05.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-11-08T10:42:32.000Z (over 2 years ago)
- Last Synced: 2024-04-14T22:47:39.687Z (about 2 years ago)
- Language: Shell
- Size: 65.4 KB
- Stars: 7
- Watchers: 36
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BOSH Release for cron
This BOSH release is intended to allow you to add generic crontab
entries to any existing BOSH deployment by colocating the `cron`
job alongside your VMs.
### Colocation Instructions
To colocate, ensure your job has the `cron` template specified:
```
instance_groups:
- name: myjob
jobs
- name: cron
release: cron
properties:
cron:
# a key-value map of any environment variables you want
# set in the crontab
#
variables:
VAR1: val1
VAR2: val2
# a list of key-value objects representing cron entries
entries:
# run a commmand already installed
- command: /usr/bin/touch /tmp/test-command-cron
minute: '*'
hour: '*'
day: '*'
month: '*'
wday: '*'
user: vcap
# ... or specify a script to install and run
- script:
name: touch.sh
contents: |
#!/bin/bash
/usr/bin/touch /tmp/test-script-cron
minute: '*'
hour: '*'
day: '*'
month: '*'
wday: '*'
user: vcap
```
When deployed, this release will generate a crontab, stick it in
/etc/cron.d/cron-boshrelease-crontab, and reload the running cron
process to read the new crontab.