A dynamic docker image, (see DockerHub), that will run a curl command periodically. This image lets you specify the curl command and the cron schedule for your use case. Inspired by jsonfry/curl-cron.
This image can be used in Docker. Continue reading for the usage explanation for docker run and for docker-compose.yml.
CRON_SCHEDULE: This parameter can be the cron schedule expression (see here for information about this expression), ornowto specify to run it onceCURL_COMMAND: Thecurlcommand that will be executed. For example:example.com
docker run -d -e CRON_SCHEDULE=now CURL_COMMAND=example.com rubenfricke/dynamic-curl-cron
dynamic-curl-cron:
container_name: DynamicCurlCron
image: rubenfricke/dynamic-curl-cron:1.0.0
environment:
- CRON_SCHEDULE=now
- CURL_COMMAND=example.com