-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cron job is not working #65
Comments
@luizeof Do you have any ideas? Please help me. |
@RammusXu Please can you re-run the above commands, but this time when you get the permissions error, can you run |
Is it clearly? |
hmmm, ok. The offending code is https://github.com/mautic/mautic/blob/staging/app/bundles/CoreBundle/Command/ModeratedCommand.php#L150 so it's a case of tracking back where this is being called from and going from there |
Mautic Docker uses crontab in the /etc/cron.d/ directory, so it does not appear in crontab -l. It does not make much sense to run the commands as root because they can write the log and the www-data apache user can not read files created by root. About the error:
Make sure the app / cache folder was created by root and set the property to www-data. |
What does this mean, set the property to www-data? Am also debugging this container now and Have checked cross referenced with Debian stretch cron documentation and it appears to be compliant. Will look in more detail tomorrow myself but ... ... has anyone progressed this at all? This image doesn't appear to have any |
I edited Also, I'm not sure if a reboot command makes sense for a docker container. |
Thanks @jesseshieh , I will try and follow suit. I'm not totally convinced my workstation is not mangling |
I've just tried taking the Digging a little deeper, the only difference I can see is the permissions applied to the file, essentially Debian stretch docs say that 644 is an appropriate setting though: cron.other files:
cron.d files, as above and:
Working:
Wasn't working:
Something seems inconsistent, perhaps it is an issue with the PHP base image. |
For me the cron was not working too but because of another reason. I have build my own Docker Image with Gitlab-CI and somehow the permissions at cloning of the repo changed to 666. So I have added this to my Dockerfile after the COPY of mautic.crontab and now it is working again:
|
This issue has been mentioned on Mautic Community Forums. There might be relevant details there: https://forum.mautic.org/t/how-to-check-mautic-cron-jobs-inside-docker-container/19792/3 |
Hi,
I have same problem as bottom of #4.
I use
docker-compose up
with the config below.I try to get cron job information with commands.
Then, I try to run mautic commnad as user
www-data
. Found some error here!The text was updated successfully, but these errors were encountered: