[8 MB] It is docker image that scheduled tasks.
10K+
Docker image contains supercronic is a powerful, lightweight tool designed
to manage your services and xh is a modern command-line HTTP client inspired
by curl. It can be integrated seamlessly into your workflow to ensure that
scheduled tasks are executed reliably.
$ docker pull imega/supercronic
Supercronic uses a configuration file to define the tasks and their schedules.
Below is an example configuration file (crontab) for Supercronic:
# Example crontab file for Supercronic
# Run a GET request every hour
0 * * * * xh GET http://example.com/api/task
# Run a POST request every day at midnight
0 0 * * * xh POST http://example.com/api/task2 key1=value1 key2=value2
To start Supercronic with your configuration file, use the following command:
$ docker run --rm -d -v `pwd`/crontabs:/crontabs imega/supercronic -json /crontabs
To validate a wrong config in example.
$ echo "*/1 * * *ERROR xh http://host.docker.internal:8081" > crontabs
$ docker run --rm -t -v `pwd`/crontabs:/crontabs imega/supercronic -test /crontabs
$ echo $?
To schedule a GET request to be sent every hour:
0 * * * * xh GET http://example.com/api/task
To schedule a POST request to be sent every day at midnight:
0 0 * * * xh POST http://example.com/api/task2 key1=value1 key2=value2
Set timezone via ENV.
$ docker run --rm -d -e TZ=Europe/Berlin \
-v `pwd`/crontabs:/crontabs \
imega/supercronic -json /crontabs
Set timezone via config.
$ echo "CRON_TZ=Europe/Berlin" > crontabs
$ echo "*/1 * * * * xh http://someservice:8081/task" >> crontabs
$ docker run --rm -d \
-v `pwd`/crontabs:/crontabs \
imega/supercronic -json /crontabs
Supercronic supports advanced configurations, including environment variables and error handling. Refer to the Supercronic documentation for more detailed information.
xh supports a lot powerful configurations like formatting output and checking statuses. Refer the xh documentation for more detailed information.
Supercronic, combined with the xh HTTP client, provides a robust solution
for managing and scheduling tasks via HTTP. By following this documentation,
you should be able to set up and configure Supercronic to handle your service
management needs efficiently. For further assistance, refer to the
official Supercronic GitHub repository
and the xh documentation.
Content type
Image
Digest
sha256:2f5f44f28…
Size
8.9 MB
Last updated
about 2 years ago
docker pull imega/supercronic