mirror of
https://github.com/chenasraf/nextcloud-pantry.git
synced 2026-05-17 17:28:01 +00:00
29 lines
606 B
PHP
29 lines
606 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
// SPDX-FileCopyrightText: Your Name <your@email.com>
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
namespace OCA\NextcloudAppTemplate\Cron;
|
|
|
|
use OCP\AppFramework\Utility\ITimeFactory;
|
|
use OCP\BackgroundJob\TimedJob;
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
class {{pascalCase name}}Task extends TimedJob {
|
|
public function __construct(
|
|
ITimeFactory $time,
|
|
private LoggerInterface $logger,
|
|
) {
|
|
parent::__construct($time);
|
|
|
|
// Run once an hour
|
|
$this->setInterval(3600);
|
|
}
|
|
|
|
protected function run($arguments): void {
|
|
// $this->myService->doCron($arguments['uid']);
|
|
}
|
|
}
|