1
0
Fork 0
mirror of https://github.com/yavook/kiwi-cron.git synced 2024-11-21 15:03:01 +00:00

Initial Commit

This commit is contained in:
Jörn-Michael Miehe 2022-02-24 18:16:01 +01:00
commit a2355c4eb6
5 changed files with 73 additions and 0 deletions

14
.drone.yml Normal file
View file

@ -0,0 +1,14 @@
---
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
repo: ldericher/kiwi-cron
auto_tag: true
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD

11
Dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM alpine:latest
RUN set -ex; \
\
mkdir /etc/periodic/5min; \
chmod 755 /etc/periodic/5min;
ENTRYPOINT [ "/usr/sbin/crond" ]
CMD [ "-fd", "8" ]
COPY crontab /var/spool/cron/crontabs/root

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Jörn-Michael Miehe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

18
README.md Normal file
View file

@ -0,0 +1,18 @@
# kiwi-cron
[![Build Status](https://github.drone.yavook.de/api/badges/ldericher/kiwi-cron/status.svg)](https://github.drone.yavook.de/ldericher/kiwi-cron)
> `kiwi` - simple, consistent, powerful
Simple cron-jobs for [`kiwi-scp`](https://github.com/ldericher/kiwi-scp)
## Quick start
kiwi-cron comes with a pre-loaded cron daemon for periodic jobs. Just drop your executables into the relevant directory under `/etc/periodic/` and that's it.
- `/etc/periodic/5min` -- is run every 5 minutes
- `/etc/periodic/15min` -- is run every 15 minutes
- `/etc/periodic/hourly` -- is run every full hour
- `/etc/periodic/daily` -- is run every day at 2am
- `/etc/periodic/weekly` -- is run every saturday at 3am
- `/etc/periodic/month` -- is run on the first day of every month at 5am

9
crontab Normal file
View file

@ -0,0 +1,9 @@
# cron jobs by kiwi-scp
#
# min hour day month weekday command
*/5 * * * * run-parts /etc/periodic/5min
*/15 * * * * run-parts /etc/periodic/15min
0 * * * * run-parts /etc/periodic/hourly
0 2 * * * run-parts /etc/periodic/daily
0 3 * * 6 run-parts /etc/periodic/weekly
0 5 1 * * run-parts /etc/periodic/monthly