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