markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.57k stars 1.01k forks source link

Cron is not working. #125

Closed gekamikh closed 5 years ago

gekamikh commented 5 years ago

I ran new Magento project.

  1. I clone template: curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template|bash -s -- magento-2
  2. I download magento: bin/download 2.3.0
  3. I add hosts: echo "127.0.0.1 magento2.test" | sudo tee -a /etc/hosts
  4. In docker-compose.dev.yml I remove comments to enable cron
  5. I run command bin/start to start magento
  6. I run command bin/setup magento2.test to setup magento

I have 4 running containers, including cron

2019-02-13 10 20 37

But in db table cron_schedule still no registered cron jobs.

2019-02-13 10 34 52

If I connect to phpfpm container (where based on other issues cron running) by command docker exec -it my-magento-store_phpfpm_1 /bin/bash and run crontab -l the result will be no crontab for app.

Running bin/magento cron:run working as well. But how can I setup or enable cron to run jobs not manualy. Thanks!

markshust commented 5 years ago

can you try again, but following exact steps at https://github.com/markshust/docker-magento#manual-setup

the steps you have taken differ from the readme. after magento is completely installed and running, then try enabling cron.

markshust commented 5 years ago

I did confirm the cron was not working. The above commit fixes it. New release will come out shortly.