Inside Docker container - crond running but no cronjobs executed

5,722

You can use the package fcron, and run the cron process in foreground mode:

fcron -f
Share:
5,722

Related videos on Youtube

dlyk1988
Author by

dlyk1988

Updated on September 18, 2022

Comments

  • dlyk1988
    dlyk1988 over 1 year

    I have built a container from a Dockerfile, based on an Archlinux base image. Using a "RUN" command I have installed "cronie", since Arch does not come with any form of cron. Now, after the container is built, I run it and attach to it. I start manually the cron daemon, verify that it is indeed running with "ps -aux" and make the required cronjobs with "crontab -e". The thing is, no cronjobs are run...

    Any ideas?

    • Abhishek Anand Amralkar
      Abhishek Anand Amralkar about 9 years
      check cron.log file and paste error here?
    • dlyk1988
      dlyk1988 about 9 years
      Will try to do later today.
    • dlyk1988
      dlyk1988 about 9 years
      @AbhishekAnandAmralkar There is no "cron.log" file in Arch Linux. I tried "journalctl -u cronie" but it returns "No journal files were found". Still, the daemon is running, and the jobs configures inside crontab.
    • Abhishek Anand Amralkar
      Abhishek Anand Amralkar about 9 years
      check for systemd/Timers ..Timers are systemd unit files with a suffix of .timer systemctl list-timers will list all the timers if any..
    • dlyk1988
      dlyk1988 about 9 years
      I mention that this is taking place inside a Docker container. No systemd is running.