Sign inSign up

agrommek/alpine-cron

By agrommek

•Updated 8 months ago

Run regular jobs (scripts) in a container via bind-mounted volume.

Image
0

2.4K

agrommek/alpine-cron repository overview

README.txt

https://wiki.alpinelinux.org/wiki/Alpine_Linux:FAQ#My_cron_jobs_don.27t_run.3F

- Make sure the script is executable (chmod +x)!
- Make sure the first line of your script is:
  #!/bin/sh -OR- #!/bin/bash
- Do not put file extensions on your script names - this stops them from working.
  For example: myscript will run, but myscript.sh won't.

The following crontab is used:

# run regular jobs from scripts
# min   hour    day     month   weekday command
*       *       *       *       *       /bin/run-parts /etc/periodic/1min
*/5     *       *       *       *       /bin/run-parts /etc/periodic/5min
*/10    *       *       *       *       /bin/run-parts /etc/periodic/10min
*/12    *       *       *       *       /bin/run-parts /etc/periodic/12min
*/15    *       *       *       *       /bin/run-parts /etc/periodic/15min
*/30    *       *       *       *       /bin/run-parts /etc/periodic/30min
0       *       *       *       *       /bin/run-parts /etc/periodic/hourly
1       */3     *       *       *       /bin/run-parts /etc/periodic/3hours
2       */6     *       *       *       /bin/run-parts /etc/periodic/6hours
3       */12    *       *       *       /bin/run-parts /etc/periodic/12hours
0       2       *       *       *       /bin/run-parts /etc/periodic/daily
0       3       *       *       6       /bin/run-parts /etc/periodic/weekly
0       5       1       *       *       /bin/run-parts /etc/periodic/monthly

The corresponding directories for "run-parts" exist in the image. They can be bind-mounted as is convenient.

Tag summary

Content type

Image

Digest

sha256:0d4c09c11…

Size

7.1 MB

Last updated

8 months ago

docker pull agrommek/alpine-cron