How to start crond automatically when restart

Hello,

I want crond to run on my Hassio running on Raspberry Pi 3. At the moment I can manually start it by going into SSH and typing command crond but i want to automate it.

I guess that you are using s6-supervise to manage services. Just I am not able to make it work. I have tried to create run and finish file but it does not work as expected. It goes in a loop

My top output

  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
  664   411 root     S     3024   0%   1   0% sshd: root@pts/0
  412   407 root     S    15564   2%   0   0% ttyd -p 8099 tmux -u new -A -s homeassistant bash -l
  411   408 root     S     3004   0%   2   0% /usr/sbin/sshd -D -e
  666   664 root     S     2332   0%   2   0% -bash
  668   666 root     R     1304   0%   2   0% top
  660     1 root     S     1300   0%   1   0% crond
  408     1 root     S      200   0%   0   0% s6-supervise sshd
   31     1 root     S      200   0%   1   0% s6-supervise s6-fdholderd
  407     1 root     S      200   0%   2   0% s6-supervise ttyd
    1     0 root     S      196   0%   2   0% s6-svscan -t0 /var/run/s6/services

Home Assistant version 0.114.3
Operating System version 3.13

Please help
Thanks

Hi statbat, did you figure this out? Also trying to get crond running/working.

In case it helps, and if you are using the SSH & Web Terminal addon, it is possible to set up an init_command to start the crond service.

As the /etc/periodic folder is going to be cleaned up on every restart of the addon, you might want to merge the scripts from one of the shared folders.

Kind of hacky, but it would be something like:

init_commands:
  - if ! pgrep -x "crond" > /dev/null; then echo starting crond; cp -RT /share/etc/periodic/ /etc/periodic/; crond -b -l 5 -L /var/log/crond.log; fi

Don’t forget that every script inside /etc/periodic folders must have execute permissions:

chmod +x /share/etc/periodic/...