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

Timed-based background jobs #30273

Closed
AndyScherzinger opened this issue Dec 14, 2021 · 7 comments · Fixed by #30945
Closed

Timed-based background jobs #30273

AndyScherzinger opened this issue Dec 14, 2021 · 7 comments · Fixed by #30945
Labels
1. to develop Accepted and waiting to be taken care of enhancement
Milestone

Comments

@AndyScherzinger
Copy link
Member

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
Some background jobs are long-runners and create heavy load, this can also happen during office hours impacting the system's performance for users during such times.

Describe the solution you'd like
Provide a way to define a time when a background job should run.
e.g. to ensure heavy load jobs don't run during office hours but rather at night.

Describe alternatives you've considered
none

Additional context

@PVince81
Copy link
Member

PVince81 commented Jan 31, 2022

Concept, as discussed with Joas and Robin:

  • add column that says time sensitive vs non-time sensitive
  • job implementors need to decide whether their job is time-sensitive or not (statically), suitable for jobs that run once or twice a day
    • deleting activities
    • file retention
    • suspicious login
    • preview cleanup
  • recommend to have a 4h window
  • off by default because we can't guess timezone, and recommend admins to enable it
  • when enabled, setup hours when expensive jobs should not run (or start time)
  • when getting next job, filter in or out based on current time
  • no sorting, just filtering
  • will only work for system cron: because all the other modes cannot guarantee. If any other mode is set, it will default to the non-time-range behavior.

@PVince81
Copy link
Member

PVince81 commented Feb 7, 2022

PR here: #30945

@AndyScherzinger
Copy link
Member Author

pinging @ChristophWurst to check if this would then fit your view of using this to implement the mail adoption, else best to align with the files team

@ChristophWurst
Copy link
Member

mail adoption

can you tell me which one specifically? We can certainly move any cleanup job. But inbox synchronization should remain an hourly job so when you open the app the cache is somewhat up to date.

I've opened nextcloud/groupware#28 for our team.

@AndyScherzinger
Copy link
Member Author

@ChristophWurst no idea tbh, it is referenced in some place in general and I believe given the cross reference for mail scheduling the outlined approach won't be an enabler for implementating scheduled mail sending.

@nickvergessen
Copy link
Member

can you tell me which one specifically? We can certainly move any cleanup job. But inbox synchronization should remain an hourly job so when you open the app the cache is somewhat up to date.

Yeah it's mostly about the "daily" things. Priority scanning comes to mind or pruning data

@blizzz
Copy link
Member

blizzz commented Oct 19, 2022

that's done, afaik?! closing.

@blizzz blizzz closed this as completed Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants