This page looks best with JavaScript enabled

Cronjob in operation

 ·  ☕ 1 min read  ·  ✍️ CheeseMocha

XXLjob

https://github.com/xuxueli/xxl-job

cronsun

https://github.com/shunfei/cronsun

airflow

https://github.com/apache/airflow

docker cronjob

if you want to refresh docker cronjob without docker restart. you need put another file under /etc/crontabs/root and update the file, the cronjob will be refreshed.

docker file:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15

FROM alpine
#RUN apk update && apk add curl nano --update python2==2.7.18-r0
RUN apk update && apk add curl nano --update python3==3.8.5-r0 py-pip
# for python3: --update python3 py-pip
COPY  requirements /requirements
COPY  get-pip.py /tmp/
#RUN python /tmp/get-pip.py
RUN  pip install -r /requirements
ENV KEYONE=KEYVALUEFROM 
COPY prod/yourprojectname/ /etc/crontabs/root
COPY prod /opt/yourprojectname

# start crond with log level 8 in foreground, output to stderr
CMD ["crond", "-f", "-d", "8","-c","/etc/crontabs"]
Share on

cheesemocha