Skip to main content

All Questions

Tagged with
2 votes
1 answer
49 views

How does one run cron jobs in one container that does stuff in another?

I am on Kubernetes. I need to be able to write and run cron jobs in a pod. I can't use the CronJob workload. The solution I found is to run cron jobs from a cron sidecar container. I write cron jobs ...
Mooch's user avatar
  • 41
1 vote
1 answer
86 views

Can't launch a cron job at the configured time [closed]

I'm running a docker container with Debian. Crontab is configured as follows: #!/bin/sh SHELL=/bin/sh 16 16 * * * /bin/sh /app/script.sh The cron job is not running in this case, but running as ...
mgrechka's user avatar
0 votes
0 answers
192 views

Unable to start cronservice as www-data user

I am trying to start cron-service using www-data user in Docker, it says Starting periodic command scheduler: cronseteuid: Operation not permitted failed! Below is the Dockerfile FROM php:8.2.12-fpm@...
Naveen Naidu's user avatar
0 votes
1 answer
542 views

Can't run crontab with users other than root

My goal is to run a Docker container that contains crontab. So I want, as a non-root user, to be able to run scheduled crontab jobs. I am running the following Docker image: FROM openjdk:8 RUN apt-get ...
FueledByPizza's user avatar
1 vote
0 answers
489 views

Why is my systemd-timer not working? (Active = Until)

I created a systemd-timer which should restart a docker container daily but it never does. That uptime of the docker container is > 1 day, that shows me the container was not restarted /lib/systemd/...
3x3cut0r's user avatar
0 votes
0 answers
630 views

How do I start the cron daemon in my docker container?

I am trying to start a cron daemon in my docker container runtime using systemctl. I run docker build and then when I try to run systemctl start crond.service in my startup script, I get the following ...
Gautam Narayan's user avatar
0 votes
0 answers
562 views

Crontab job that runs a command inside a docker container not working

In my todo list django website I have a command sudo docker-compose -f docker-compose-prod.yml exec todo-prod-web python manage.py do_something that has to run in the prod enviroment everyday at 10 ...
Mohcen CH's user avatar
  • 101
0 votes
0 answers
13 views

Why does my Backup Cronjob not work? [duplicate]

I am currently trying to Backup my persistant Docker data once a week. But somehow my cronjob wont work. Cron has no problem with other jobs. Just with this one and i dont understand why. I edited the ...
BrianFarmer's user avatar
0 votes
1 answer
2k views

How to prevent rsyslog from logging cron tasks to /var/log/syslog using additional config

I have a Docker image for cron tasks. Here is the Dockerfile: FROM php:8.0-fpm RUN apt-get update RUN apt-get install -y cron rsyslog RUN touch /var/log/cron.log RUN chmod 0777 /var/log/cron.log ...
femalemoustache's user avatar
2 votes
1 answer
9k views

How to run a cronjob as a non-root user in a Docker container for Alpine Linux?

I have built the container using Dockerfile, in which I am using PHP-FPM Alpine Linux image. I need to run a cron job inside this container periodically. Once the application file is copied to the /...
astrosixer's user avatar
1 vote
1 answer
381 views

Send cron mail using dockerised postfix

I recently moved postfix into a docker container, with ports 25 and 587 exposed on the host machine. Since doing this, cron on the host machine is now unable to send emails due to No MTA installed, ...
SystemParadox's user avatar
1 vote
2 answers
2k views

Docker run is not working as cron command

The command below works nicely and puts "Hello from Docker." to out.txt docker run -it --rm ubuntu echo "Hello from Docker." >> /home/ubuntu/out.txt`` Then when I open "...
Vladimir Buskin's user avatar
0 votes
1 answer
2k views

docker-compose up -d quiet option to suppres up-to-date

I want to update a docker container in crontab and only get an email if something gets wrong, so I call 12 4 * * * cd /var/docker-services/mycontainer/; docker-compose pull -q && docker-...
rubo77's user avatar
  • 30.2k
1 vote
2 answers
436 views

Cron task does not work

I am developing a backup script in my NAS running a docker container. Inside my container I have cron running with this /etc/crontab: root@backups-nas:/code# cat /etc/crontab SHELL=/bin/bash PATH=/...
Ángel Carlos del Pozo Muela's user avatar
1 vote
0 answers
598 views

Cron jobs not running on Kubernetes + Alpine linux

I am trying to run a cron job on Alpine Linux docker image which is then pushed in Kubernetes container. The Cron job is that I want the container to restart itself after every 15 mins. So my command ...
Nitesh Joshi's user avatar

15 30 50 per page