Add Contao example to README.md#66
Conversation
Add example for Contao CMS. This cronjob is required for the search function to work in the Contao backend. https://docs.contao.org/manual/en/performance/cronjobs/
Updated table of contents
rfay
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Minor suggestions. Please test them out in your environment.
README.md
Outdated
|
|
||
| - Create a `./.ddev/web-build/contao.cron` file | ||
| - Add the following code to run the Contao scheduler every minute. | ||
| - Adjust `php8.4` to match your DDEV project's PHP version |
There was a problem hiding this comment.
| - Adjust `php8.4` to match your DDEV project's PHP version |
No need to specify php version
README.md
Outdated
| - Adjust `php8.4` to match your DDEV project's PHP version | ||
|
|
||
| ```cron | ||
| * * * * * /usr/bin/php8.4 /var/www/html/vendor/bin/contao-console contao:cron |
There was a problem hiding this comment.
| * * * * * /usr/bin/php8.4 /var/www/html/vendor/bin/contao-console contao:cron | |
| * * * * * php contao-console contao:cron |
No need to specify php version, and vendor/bin is already in the PATH
There was a problem hiding this comment.
Thanks. I have done several tests with the following two variants: After each change I ran ddev restart, cleared the Contao cache in the Contao manager and checked if the backend search works (also let it run 3-5 minutes and refreshed the backend).
* * * * * php contao-console contao:cron : The backend search does not work with this short variant and the database cron table is not updated every minute.
* * * * * php /var/www/html/vendor/bin/contao-console contao:cron : This variant works in my tests.
There was a problem hiding this comment.
Oh sorry, I see. It's not a script.
rfay
left a comment
There was a problem hiding this comment.
Thanks! Will pull when you're ready.
|
Sure, go for it :-) Thank you |
|
Thanks! |
|
Thank you! |
Add example for Contao CMS. This cronjob is required for the search function to work in the Contao backend.
Contao Backend Search Requirement
Contao Cronjob Framework