Added service-exec script for running periodic processes
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
FROM cron
|
||||
MAINTAINER gyurix
|
||||
COPY . /
|
||||
RUN mkdir -p /opt/cron
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
COPY cron-re-read.sh /cron-re-read.sh
|
||||
COPY service /usr/local/bin/
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@@ -1,11 +1,13 @@
|
||||
#! /bin/sh
|
||||
|
||||
ENV=/root/.bashrc ash
|
||||
|
||||
file="/crontab";
|
||||
{
|
||||
echo "SHELL=/bin/sh
|
||||
* * * * * /cron-re-read.sh"
|
||||
} > "$file";
|
||||
|
||||
cat /crontab.txt >> /crontab
|
||||
cat /opt/cron/crontab.txt >> /crontab
|
||||
|
||||
crontab -l | cat /crontab |crontab -
|
||||
|
@@ -1,3 +1 @@
|
||||
* * * * * echo "OK"
|
||||
* * * * * echo "OK2"
|
||||
* * * * * echo "OK3"
|
||||
* * * * * echo "Cron works"
|
||||
|
Reference in New Issue
Block a user