Christoph Wurst
7ea6eac743
fix(cron): Log long running jobs
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 days ago
Josh
8ee070cce5
fix(cron): Log excess memory usage at debug and info levels
Signed-off-by: Josh <josh.t.richards@gmail.com>
3 weeks ago
Julien Veyssier
c39c0ab46d
fix(cron): avoid accessing unset argv index
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 week ago
Andy Scherzinger
5c49a54801
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
3 weeks ago
Simon L.
88648fa493
Revert: "Check datadirectory owner, not config owner."
Signed-off-by: Simon L <szaimen@e.mail.de>
1 month ago
Julien Veyssier
0eb4cddc54
feat(bg-jobs): support multiple arguments in cron.php and occ:background-job:worker for the job class list
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2 months ago
Julien Veyssier
1acc57b5c0
feat(bg-jobs): allow setting a job class list instead of a single class in cron.php and the job worker occ command
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2 months ago
Julien Veyssier
9814bffb77
chore(bg-jobs): add -h help option to cron.php
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2 months ago
Julius Härtl
52eb6d8726
feat(bg-jobs): Allow calling cron.php with a background job class
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2 years ago
Herman van Rink
164c05e40b
fix: Cron misrepresenting itself as console
Signed-off-by: Herman van Rink <rink@initfour.nl>
3 months ago
Côme Chilliet
65bad47e7e
fix: Suppress psalm errors about deprecated execute method, we have to use it for now
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 months ago
Côme Chilliet
75751d51de
fix: Call execute until it is removed for Job class
Because if an application extends execute it will change behavior
without warning otherwise.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 months ago
Sam Bull
ae3b9cce99
feat: check `datadirectory` owner instead of `config.php` owner
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
3 years ago
Côme Chilliet
303e2febc7
Merge pull request #43387 from nextcloud/fix/migrate-away-from-ilogger-in-jobs
4 months ago
Louis Chemineau
898df41de9
Revert "Merge branch 'master' of github.com:nextcloud/server"
This reverts commit d9d60238c7aaab9c61bf2d50c15aa59bc88c8975, reversing
changes made to ba3fdb0cdc
.
4 months ago
Côme Chilliet
1eb89421cc
fix(cron.php): Avoid pulling configuration twice
IConfig is a small wrapper around SystemConfig, no need to pull both of them
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 months ago
Côme Chilliet
ecfa7c3ca3
chore(cron.php): Migrate uses of legacy classes from lib/private/legacy
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 months ago
Côme Chilliet
65d013b9ae
fix(cron.php): Use new IAppConfig interface in cron.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 months ago
Côme Chilliet
eb89da9f30
chore(cron.php): Migrate away from ILogger and \OC::$server
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 months ago
Côme Chilliet
b105603fd1
chore: Remove last uses of IJob::execute method
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 months ago
Joas Schilling
eeb0007cd3
fix(cron): Fix "Using $this when not in object context"
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 months ago
Joas Schilling
b8c57efaad
fix(log): Improve logging of background job details for better reproduction/debugging
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 months ago
Joas Schilling
28b55bba55
feat(cron): Warn on excessive memory consumption in background jobs
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 months ago
Julius Härtl
c8a6dad519
Cleanup tempfiles after each cron job run
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2 years ago
Kirill Popov
0b27b9e658
Get not only time-sensitive next job from list but any
Before the change webcron used to select
**only** time-sensitive tasks.
Signed-off-by: Kirill Popov <kirill.s.popov@gmail.com>
2 years ago
Joas Schilling
3fd55cb4df
Allow sysadmins to define a maintenance window where heavier jobs can run
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
Louis Chemineau
6afab63e09
Output exception in cron
Signed-off-by: Louis Chemineau <louis@chmn.me>
2 years ago
smichel17
84d3a5f8e6
cron: exit 1 on exception
Allows the caller to more easily respond to cron failures.
Signed-off-by: Stephen Michel <git@smichel.me>
2 years ago
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Christoph Wurst
9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
hoellen
563f1318cd
Remove posix_getpwuid and compare only userid
Signed-off-by: hoellen <dev@hoellen.eu>
3 years ago
J0WI
68ce17e59b
Unify links to php.net
Update all links to https://www.php.net/
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
3 years ago
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Michael Kuhn
ab6a18f420
cron: Adapt to 5 minutes recommendation
Update the comment to make clear that we ask for 14 minutes worth of
jobs on purpose so at most three parallel cron jobs are running.
Signed-off-by: Michael Kuhn <michael@ikkoku.de>
4 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Daniel Kesselberg
f25e2d82a5
Make the warning about wrong permissions more clear.
It's basically the same as for console.php now.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Joas Schilling
0c77cd21f9
Make sure maintenance mode is always casted to bool
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
7860c81523
Fix code style
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Morris Jobke
dd34cb7540
Less deprecated calls to OCP\Util::writeLog
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
9ef6148bfa
Deprecated OCP interface to fetch background job type
* was not used by apps and also is not needed
* migrated the documentation to IJobList
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
7bc1001309
Log full exception in cron instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
e70edb33db
Log full exception in cron instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Roeland Jago Douma
b8af7ee9bc
Nextcloud 13 is not compatible with newer than php 7.2
Just to avoid users from trying this with a to new (untested) php version
* Moved the check logic to 1 place
* All directly callable scripts just require this on top
* exit hard (-1) so we know scripts won't continue
* Return status 500 so no sync clients will try fancy stuff
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Morris Jobke
0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
1c38a83927
Always log cron execution
There was a setting to disable the last execution of cron. There is no known
problem with this write access and it was also questioned when this feature
was build in https://github.com/owncloud/core/pull/7689#issuecomment-38264707
Recently there was also a bug report about a non-visible last cron execution
(#6088 ) - let's better remove this.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Noveen Sachdeva
1b1f403a5d
Add duration of last job execution to the table
7 years ago