Public Repository

Last pushed: a year ago
Short Description
Cron with Curator
Full Description

Docker-Cron_Curator

Use Cron inside Docker. Looks for crontab at /cron/crontab

touch /host/folder/containing/cron/crontab
write your cron cmd in crontab.
Example 0 0 0 0 0 0 echo "privet"

$ docker run -v /host/folder/containing/crontab:/cron -d --name cron_curator denwood/cron_curator

Example for Curator CMD in crontab :

0 0 0 0 0 /usr/local/bin/curator --host 10.0.0.74 --port 9201 delete indices --older-than 2 --time-unit days --timestring '%Y.%m.%d' --prefix logstash
0 0 0 0 0 /usr/local/bin/curator --host 10.0.0.74 --port 9201 delete indices --older-than 2 --time-unit days --timestring '%Y.%m.%d' --prefix winlogbeat
0 0 0 0 0 /usr/local/bin/curator --host 10.0.0.74 --port 9201 delete indices --older-than 3 --time-unit days --timestring '%Y.%m.%d' --prefix topbeat

// Default port for elasticsearch is "9200"

Fields
.---------------- minute (0 - 59)
| .------------- hour (0 - 23)
| | .---------- day of month (1 - 31)
| | | .------- month (1 - 12) OR jan,feb,mar,apr ...
| | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
| | | | |
1 2 2 0 0

Crontab genrator Online : http://www.openjs.com/scripts/jslibrary/demos/crontab.php

Good luck and fun :)

Docker Pull Command
Owner
denwood

Comments (0)