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

Limit max executing time for cron tasks #35

Open
fermion2020 opened this issue Apr 23, 2024 · 1 comment
Open

Limit max executing time for cron tasks #35

fermion2020 opened this issue Apr 23, 2024 · 1 comment

Comments

@fermion2020
Copy link

Description of the feature
At times, I've encountered situations where cron tasks became unresponsive, causing numerous processes to run and hang indefinitely, thus consuming significant resources.

I believe implementing a maximum execution time limit for cronjobs using the timeout command is a prudent idea. This measure should prevent any potential issues, provided the timeout duration is reasonable. For instance, setting a timeout of 30 minutes for tasks scheduled every 5 minutes should ensure smooth operation without risking system stability.

Benftits of feature

Having better control of background tasks.

Additional context

@tiredofit
Copy link
Owner

It may be beneficial to try looking into this nextcloud option to see if it would solve your issues: https://docs.nextcloud.com/server/28/admin_manual/configuration_server/background_jobs_configuration.html#parameters

I can build that into an environment variable for future releases, but something about killing a process thats long running repeatedly seems like it could eventually come back and hurt.

Regardless, this will likely end up as a feature in an upcoming base image (alpine/debian) release..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants