-
-
Notifications
You must be signed in to change notification settings - Fork 11
Use crontab for cron, add examples to README including typo3 scheduler #14
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
Conversation
4e332d2 to
9729db8
Compare
|
Thank you for this. I saw the conversation on Discord and was planning on updating readme to include 'crontab' |
|
I hadn't ever had any experience with the TYPO3 thing, but both TYPO3 and Drupal required extra effort because of how settings.ddev.php is only included if IS_DDEV_PROJECT, and for Drupal, also needed a trigger on DDEV_PHP_VERSION. I don't think that ddev_contrib recipe could have worked as it was, maybe I missed something. |
|
It is one of the benefits of ddev addons. We have a chance to update the process and docs based on modern (current) frameworks. |
|
Personally I have an error with the TYPO3 example:
To avoid having this error, I have to make Any idea? |
|
Hi @echavaillaz - Please show the actual hooks you're using. I used this (from the README, https://github.com/drud/ddev-cron#examples and it worked fine. What was missing earlier was the IS_DDEV_PROJECT=true. Please remove your existing hook and use the example, and maybe do a hooks:
post-start:
- exec: printf "SHELL=/bin/bash\n* * * * * date |& tee -a /var/www/html/date.log\n* * * * * IS_DDEV_PROJECT=true /var/www/html/vendor/bin/typo3 scheduler:run -vv |& tee -a /var/www/html/scheduler-log.txt\n" | crontabAs explained in the README (updated), you can experiment using the crontab command directly until you have it going. |
|
Hi, thanks for the answer. I try what you purpose but the error is still the same for me... Thanks |
|
I think the problem is that the cron don't take care of the |
|
@echavaillaz please try a plain vanilla TYPO3 installation. Use the DDEV TYPO3 quickstart from the docs. Then |
|
This isn't the place to discuss this, it needs a new issue, or we can talk more in discord, but I know it can work for you. I spent half a day sorting out the basic issue, so feel very familiar with it. We can do a screenshare call if you like. |
crontabinstead of putting things directly into /etc/cron.d. This makes commands run as the user instead of as root, avoiding permissions problemsThis PR can be tested with
ddev get https://github.com/rfay/ddev-cron/tarball/20220721_easier_perms_cron.dThe new README is at https://github.com/drud/ddev-cron/blob/8db9f512e8c1400a0f8363d75da2bb74aaa253bf/README.md