H2-invent / open-datenschutzcenter

Open Source Datenschutzmanagement System
https://open-datenschutzcenter.de
GNU Affero General Public License v3.0
34 stars 10 forks source link

cron command returns error code 1 #257

Open rschueler opened 2 months ago

rschueler commented 2 months ago

Describe the bug The docker console for the app container shows following error: time="2024-05-08T13:04:00+02:00" level=info msg=starting iteration=68 job.command="sudo -E -u docker -- bash -c 'php /var/www/html/bin/console cron:run'" job.position=0 job.schedule="* * * * *" time="2024-05-08T13:04:00+02:00" level=info channel=stderr iteration=68 job.command="sudo -E -u docker -- bash -c 'php /var/www/html/bin/console cron:run'" job.position=0 job.schedule="* * * * *" time="2024-05-08T13:04:00+02:00" level=info msg=" " channel=stderr iteration=68 job.command="sudo -E -u docker -- bash -c 'php /var/www/html/bin/console cron:run'" job.position=0 job.schedule="* * * * *" time="2024-05-08T13:04:00+02:00" level=info msg=" There are no commands defined in the \"cron\" namespace. " channel=stderr iteration=68 job.command="sudo -E -u docker -- bash -c 'php /var/www/html/bin/console cron:run'" job.position=0 job.schedule="* * * * *" time="2024-05-08T13:04:00+02:00" level=info msg=" " channel=stderr iteration=68 job.command="sudo -E -u docker -- bash -c 'php /var/www/html/bin/console cron:run'" job.position=0 job.schedule="* * * * *" time="2024-05-08T13:04:00+02:00" level=info channel=stderr iteration=68 job.command="sudo -E -u docker -- bash -c 'php /var/www/html/bin/console cron:run'" job.position=0 job.schedule="* * * * *" time="2024-05-08T13:04:00+02:00" level=error msg="error running command: exit status 1" iteration=68 job.command="sudo -E -u docker -- bash -c 'php /var/www/html/bin/console cron:run'" job.position=0 job.schedule="* * * * *

It look like the wrong command is used "console cron:run" instead of "console app:cron"

To Reproduce Steps to reproduce the behavior:

  1. Go to docker logs of app container
  2. See error

Expected behavior No error shown

holzi1005 commented 1 month ago

Hallo @rschueler in den Commands sollte es den Command app:cron geben und dieser startet den Cron Service. Der Service kann auch über eine URL gestartet werden aber der Command sollte korrekt sein.

Wie sieht ihr Cron File aus?