Skip to content
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

Creating laravel cron entry stopped working when running with github workflow #46

Open
priithansen opened this issue Feb 3, 2025 · 0 comments

Comments

@priithansen
Copy link

Some time in the end of January it seems that the line in Dockerfile creating Laravel cron entry responsible for running the scheduler stopped working (when running with Github workflow). No idea if the timing is coincidental or something in the dependency chain got updated.

Tested with clean Laravel v11 installation following instructions from here https://fly.io/docs/laravel/advanced-guides/github-actions/

When running fly deploy locally everything seems to work as expected. When the deploy happens through Github workflow the /etc/cron.d/laravel file is missing. No differences or errors in build logs I can identify.

For a workaround ended up changing the Dockerfile logic to copy a premade laravel file from /.fly/cron/

# /.fly/cron/laravel

MAILTO=""
* * * * * www-data /usr/bin/php /var/www/html/artisan schedule:run

Deleted line
&& echo "MAILTO=\"\"\n* * * * * www-data /usr/bin/php /var/www/html/artisan schedule:run" > /etc/cron.d/laravel \
from Dockerfile and added
COPY .fly/cron/ /etc/cron.d/

Repo: https://github.com/priithansen/laravel-fly-schedule-test

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

No branches or pull requests

1 participant