https://github.com/scbd/drupal-cron-scripts
drupal
https://github.com/scbd/drupal-cron-scripts
Last synced: 2 months ago
JSON representation
drupal
- Host: GitHub
- URL: https://github.com/scbd/drupal-cron-scripts
- Owner: scbd
- License: mit
- Created: 2017-11-14T22:07:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-04T22:10:06.000Z (over 8 years ago)
- Last Synced: 2025-12-27T13:54:42.376Z (6 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
Dockerfile and scripts for creating image with Cron based on node:alpine. Inspired by
[xordiv/docker-alpine-cron](https://github.com/xordiv/docker-alpine-cron).
#### Send job to rabbitmq for processing
#### Environment variables:
CRON_STRINGS - strings with cron jobs. Use "\n" for newline (Default: undefined)
CRON_TAIL - if defined cron log file will read to *stdout* by *tail* (Default: undefined)
By default cron running in foreground
#### Cron files
- /etc/cron.d - place to mount custom crontab files
When image will run, files in */etc/cron.d* will copied to */var/spool/cron/crontab*.
If *CRON_STRINGS* defined script creates file */var/spool/cron/crontab/CRON_STRINGS*
#### Log files
Log file by default placed in /var/log/cron/cron.log
#### Simple usage:
```
docker run --name="alpine-cron-sample" -d \
-v /path/to/app/conf/crontabs:/etc/cron.d \
-v /path/to/app/scripts:/scripts \
xordiv/docker-alpine-cron
```
#### With scripts and CRON_STRINGS
```
docker run --name="alpine-cron-sample" -d \
-e 'CRON_STRINGS=* * * * * root /scripts/myapp-script.sh'
-v /path/to/app/scripts:/scripts \
xordiv/docker-alpine-cron
```
#### Get URL by cron every minute
```
docker run --name="alpine-cron-sample" -d \
-e 'CRON_STRINGS=* * * * * root wget https://sample.dockerhost/cron-jobs'
xordiv/docker-alpine-cron
```
#### TODO
- (read msg from cron queue / async create new every 1 sec or imidiatly) ?
- read cron endpoint, read created queue msg jobs for workers based on time.