Skip to content

Conversation

@tyler36
Copy link
Collaborator

@tyler36 tyler36 commented Oct 12, 2023

This PR updates the Drupal example to prevent an error.

Fixes #36.

@tyler36 tyler36 force-pushed the 20231012_fix_cron_examples branch from efb3331 to 124fcb0 Compare October 12, 2023 01:03
@tyler36
Copy link
Collaborator Author

tyler36 commented Oct 12, 2023

@mglaman Could you give this a try if when you get a chance?

(sorry for the the previous mis-placed post)

@tyler36 tyler36 closed this Oct 19, 2023
@tyler36 tyler36 force-pushed the 20231012_fix_cron_examples branch from 124fcb0 to c5c0553 Compare October 19, 2023 02:14
@tyler36 tyler36 reopened this Oct 19, 2023
@tyler36
Copy link
Collaborator Author

tyler36 commented Oct 19, 2023

Accidently closed? Not sure how that happened.

Tried the follow options:

Debug

* * * * * IS_DDEV_PROJECT=true /var/www/html/vendor/bin/drush cron | tee -a /var/www/html/cron-log1.txt
* * * * * IS_DDEV_PROJECT=true /var/www/html/vendor/bin/drush cron -v | tee -a /var/www/html/cron-log2.txt
* * * * * IS_DDEV_PROJECT=true /var/www/html/vendor/bin/drush cron |& tee -a /var/www/html/cron-log3.txt
* * * * * IS_DDEV_PROJECT=true /var/www/html/vendor/bin/drush cron -v |& tee -a /var/www/html/cron-log4.txt
* * * * * cd /var/www/html && IS_DDEV_PROJECT=true ./vendor/bin/drush cron | tee -a /var/www/html/cron-log5.txt
* * * * * cd /var/www/html && IS_DDEV_PROJECT=true ./vendor/bin/drush cron |& tee -a /var/www/html/cron-log6.txt
* * * * * cd /var/www/html && IS_DDEV_PROJECT=true ./vendor/bin/drush cron -v | tee -a /var/www/html/cron-log7.txt
* * * * * cd /var/www/html && IS_DDEV_PROJECT=true ./vendor/bin/drush cron -v |& tee -a /var/www/html/cron-log8.txt
*

Resulted in cront-log1.txt, cront-log2.txt, cront-log5.txt, cront-log7.txt files being generated.
So including |& seems to cause the job to fail.

Debug 2

* * * * * IS_DDEV_PROJECT=true /var/www/html/vendor/bin/drush cron |& tee -a /var/www/html/cron-log3.txt

I added a hook_cron to a test module to write to the log. Including |& failed to write to the log.
Changing |& to | and restarting DDEV wrote to the log.

@tyler36 tyler36 merged commit a3d453f into ddev:main Oct 20, 2023
@tyler36 tyler36 deleted the 20231012_fix_cron_examples branch October 20, 2023 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot start project when cron files are defined

1 participant