0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-04-29 11:30:33 +00:00
nextcloud_server/tests/lib/BackgroundJob/TestTimedJobNew.php
Christoph Wurst 2395526e6c
perf(cron): Delay (re)checking timed jobs
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2025-03-31 13:21:29 +02:00

26 lines
519 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace Test\BackgroundJob;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
class TestTimedJobNew extends TimedJob {
public bool $ran = false;
public function __construct(ITimeFactory $timeFactory) {
parent::__construct($timeFactory);
$this->setInterval(10);
}
public function run($argument) {
$this->ran = true;
}
}