Skip to content

Add Contao example to README.md#66

Merged
rfay merged 3 commits intoddev:mainfrom
CMSworker:patch-1
Jul 16, 2025
Merged

Add Contao example to README.md#66
rfay merged 3 commits intoddev:mainfrom
CMSworker:patch-1

Conversation

@CMSworker
Copy link
Contributor

@CMSworker CMSworker commented Jul 16, 2025

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

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
Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* * * * * /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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I see. It's not a script.

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will pull when you're ready.

@CMSworker
Copy link
Contributor Author

CMSworker commented Jul 16, 2025

Sure, go for it :-) Thank you

@rfay rfay merged commit 9ee0b54 into ddev:main Jul 16, 2025
2 checks passed
@rfay
Copy link
Member

rfay commented Jul 16, 2025

Thanks!

@CMSworker CMSworker deleted the patch-1 branch July 16, 2025 20:43
@tyler36
Copy link
Collaborator

tyler36 commented Jul 16, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants