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

run all cronjobs in pod if any defined jobs would cause a pod to remain runing #256

Open
shreddedbacon opened this issue Nov 3, 2023 · 1 comment

Comments

@shreddedbacon
Copy link
Member

shreddedbacon commented Nov 3, 2023

To prevent an influx of cronjobs starting at the same time and trying to schedule pods, it might be an idea to run all cronjobs inside of the defined service pod if any of the cronjobs would cause the pod to remain running

If I have 5 cronjobs defined, and 1 of them runs every 5 minutes, rather than create 4 additional kubernetes native cronjobs, schedule all of them within the pod that remains running the 5 minute cronjob

@shreddedbacon
Copy link
Member Author

We could also have an option to specify directly if the cronjob should run as a native k8s cronjob by extending the .lagoon.yml support to include a flag like so, so that the behaviour of bundling cronjobs can be overwritten if required.

cronjobs:
  - name: Hourly Drupal Cron
    schedule: "M * * * *" # Once per hour, at a random minute.
    command: drush cron
    service: cli
    native: true

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