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

Enhance backgroundjob timings #17726

Closed
wants to merge 2 commits into from
Closed

Enhance backgroundjob timings #17726

wants to merge 2 commits into from

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Oct 28, 2019

This adds the AtJob backgroundjob. A background job that will run once a day after, but as close to the specified time as possible.

Example usages:

  • Run share expiration as close to midnight as possible
  • Run suspiciouslogin training at 03:00 when the system is likely to have low usage

There is also teh dailyJob which is just a prefilled instance to run at midnight.

TODO;

  • Tests

@rullzer rullzer added this to the Nextcloud 18 milestone Oct 28, 2019
@rullzer
Copy link
Member Author

rullzer commented Oct 28, 2019

@ChristophWurst @nickvergessen @blizzz @juliushaertl @skjnldsv

feedback is welcome ;)

@rullzer rullzer mentioned this pull request Oct 28, 2019
4 tasks
@nickvergessen
Copy link
Member

My main concern with stuff like this is, we can not know whethere an instance has such working times, and when they are. 🤔

@rullzer
Copy link
Member Author

rullzer commented Oct 29, 2019

Well sure. But that is the same with jobs right now.

My concern is that with some jobs that run daily we have to make sure they run early that day. Otherwise the notification might not make sense anymore

@ChristophWurst
Copy link
Member

My concern is that with some jobs that run daily we have to make sure they run early that day. Otherwise the notification might not make sense anymore

Which jobs are those?

@rullzer
Copy link
Member Author

rullzer commented Oct 29, 2019

My concern is that with some jobs that run daily we have to make sure they run early that day. Otherwise the notification might not make sense anymore

Which jobs are those?

  • Share expiration jobs ideally
  • Possible new jobs like in Enh/share expiration notification #17727 where we want to send a notification a day in advance. It is of little use if that gets send at 23:00 on day A and the share expires at 00:00 on day A+1

@ChristophWurst
Copy link
Member

Yes, but the argument remains that we don't know the working hours of every instance. Instances are also used for different time zones and then "night", "day" and "early that day" are ambiguous time frames.

@rullzer
Copy link
Member Author

rullzer commented Oct 29, 2019

@ChristophWurst not really. If your machine operates in timezone A. then allyour share expiration dates are in that timezone. So if you want to clean them up

In any case. @nickvergessen had a better idea so lets close this for now.

@rullzer rullzer closed this Oct 29, 2019
@nickvergessen nickvergessen deleted the enh/daily_job branch November 26, 2019 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants