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

[5.x] Add the $CRONTAB_SETTINGS variable #101

Merged
merged 1 commit into from
Aug 10, 2024
Merged

[5.x] Add the $CRONTAB_SETTINGS variable #101

merged 1 commit into from
Aug 10, 2024

Conversation

shinsenter
Copy link
Owner

You can also easily set up cron jobs through the $CRONTAB_SETTINGS environment variable in the docker-compose.yml file.
When the container starts, these settings are loaded into crontab, giving you more flexibility to change them later.

services:
  web:
    image: shinsenter/php:8.3-fpm-nginx
    environment:
      ENABLE_CRONTAB: "1"
      CRONTAB_SETTINGS: |
        0 0 * * * echo "Hello new day!" | tee /tmp/cron-daily.txt
        * * * * * echo "This line will run every minute!" | tee /tmp/cron-every-minute.txt

@shinsenter shinsenter merged commit 6e9c735 into main Aug 10, 2024
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.

None yet

1 participant