使用docker
实现定时调用某个HTTP接口,原理是定时执行wget
命令
version: '2'
services:
cron:
image: inutano/wget
container_name: nextcloud-cron
entrypoint: |
sh -c 'sh -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM
while /bin/true; do
wget -O /dev/null -q http://app/cron.php
sleep 15m
done
EOF'
restart: always