-
-
Notifications
You must be signed in to change notification settings - Fork 12
Add Contao example to README.md #66
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |||||
| - [Useful sites and debugging](#useful-sites-and-debugging) | ||||||
| - [Examples](#examples) | ||||||
| - [Logging current time](#logging-current-time) | ||||||
| - [Contao cron](#contao-cron) | ||||||
| - [Drupal cron](#drupal-cron) | ||||||
| - [Laravel cron](#laravel-cron) | ||||||
| - [OpenMage cron](#openmage-cron) | ||||||
|
|
@@ -87,6 +88,16 @@ Every minute, it writes the current time (UTC timezone) to `./time.log`. | |||||
| - Restart the DDEV project to start the time example. | ||||||
| - After at least a minute, you should see `./time.log` containing the web container's current time. | ||||||
|
|
||||||
| ### Contao cron | ||||||
|
|
||||||
| - 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 | ||||||
|
|
||||||
| ```cron | ||||||
| * * * * * /usr/bin/php8.4 /var/www/html/vendor/bin/contao-console contao:cron | ||||||
|
||||||
| * * * * * /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.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to specify php version