Skip to content

razvanstoica89/cronjobs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cronjobs

GitHub GitHub last commit (branch) GitHub tag (latest by date) Docker Image Size (latest by date) Docker Cloud Automated build Docker Cloud Build Status

A minimal Docker image based on Alpine Linux with curl for cronjobs

Usage

Create a docker-compose.yml with:

version: '3'

services:
    cronjobs:
      restart: unless-stopped
      image: razvanstoica/cronjobs:3
      container_name: <your container name goes here>
      volumes:
        - ./crontabs/root:/etc/crontabs/root

Put your cronjobs in ./crontabs/root file.

Run it with docker-compose up command.

Logs

Set the output to /dev/stdout in order to view the cron result.

Example: * * * * * curl -s4 ifconfig.co > /dev/stdout.

Read all the logs with docker logs <your container name goes here>.

In order to persist the logs you can add a new volume like this:

version: '3'

services:
    cronjobs:
      restart: unless-stopped
      image: razvanstoica/cronjobs:3
      container_name: <your container name goes here>
      volumes:
        - ./crontabs/root:/etc/crontabs/root
        - ./log:/var/log/

Set the output to /var/log/<your log file name goes here> in order to view the cron result.

Example: * * * * * curl -s4 ifconfig.co > /var/log/<your log file name goes here>

Contributing

Feel free to contribute.

Versioning scheme

Same as Alpine Linux.

License

This project is licensed under the MIT License - see the LICENSE file for detail

Authors

See also the list of contributors who participated in this project.

Changelog

See the full change log here.

About

A minimal Docker image based on Alpine Linux with curl for cronjobs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages