diff --git a/2.11/docker-compose.yml b/2.11/docker-compose.yml index 445aaed..54dbcd9 100644 --- a/2.11/docker-compose.yml +++ b/2.11/docker-compose.yml @@ -12,6 +12,8 @@ services: - "ocsreportsdata:/usr/share/ocsinventory-reports/ocsreports/extensions" - "varlibdata:/var/lib/ocsinventory-reports" - "httpdconfdata:/etc/apache2/conf-available" + # make use of cron with crontab inside of container by mounting the specified file + # - "./crontab:/etc/cron/docker-crontab" environment: OCS_DB_SERVER: ocsinventory-db OCS_DB_USER: ocsuser diff --git a/2.11/docker-entrypoint.d/40-crontab.sh b/2.11/docker-entrypoint.d/40-crontab.sh new file mode 100644 index 0000000..5ea0fcc --- /dev/null +++ b/2.11/docker-entrypoint.d/40-crontab.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +CRONTAB_FILE="/etc/cron/docker-crontab" + +if [ -f $CRONTAB_FILE ]; then + crontab $CRONTAB_FILE + cron -n +fi \ No newline at end of file