The best crontab container for your docker compose file.
The crontab image is a tool designed to make it easy for users to run and customize cron on a Docker Compose project. Our mission is to provide a user-friendly and efficient solution that can save time and increase productivity.
By using the crontab image, users can expect the following benefits:
- Saves time by automating scheduled tasks or scripts
- Increases accuracy by providing detailed logs and real time information
- Allows for easy collaboration and integration on
docker-compose.ymlfile
We are constantly working to improve the crontab and add new features that will make the app even more useful. Thank you for choosing our crontab image!
This is the minimal footprint for crontab on your docker compose projects
version: "3"
services:
crontab:
image: javanile/crontab
command:
- "* * * * * ping 8.8.8.8"
- "0 0 1 * * rm -fr /tmp"The classic /etc/crontab is supported. But DON'T refer to user on crontab.
version: "3"
services:
mysql:
image: javanile/crontab
volumes:
- ./crontab:/etc/crontabAs example ./crontab file. DON'T USE ROOT ON FILE
* * * * * date >> /app/debug.logThis is just an example, and the content can be tailored according to the specifics of the project. The goal is just to give an overview of what's the purpose of the project, and what are the advantages of using it.
version: "3"
services:
crontab:
image: javanile/crontab
command:
- "* * * * * bash /app/my-project-script.sh"
volumes:
## Mount local path '.' over '/app' to accessing on script file-system
- .:/app
## Mount 'docker.sock' to enable your script running 'docker compose' as end-user
- /var/run/docker.sock:/var/run/docker.sockBy default javanile/crontab logs on stdout visible with the following command
$ docker compose logs -f crontabThe MIT License (MIT). Please see License File for more information.