mirror of
https://github.com/chenasraf/cospend-nc.git
synced 2026-05-18 01:39:06 +00:00
35 lines
662 B
PHP
35 lines
662 B
PHP
<?php
|
|
/**
|
|
* Nextcloud - Cospend
|
|
*
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
* later. See the COPYING file.
|
|
*
|
|
*/
|
|
|
|
namespace OCA\Cospend\Cron;
|
|
|
|
use OCA\Cospend\Service\CospendService;
|
|
use OCP\AppFramework\Utility\ITimeFactory;
|
|
use OCP\BackgroundJob\TimedJob;
|
|
|
|
class AutoExport extends TimedJob {
|
|
|
|
public function __construct(
|
|
ITimeFactory $time,
|
|
private CospendService $cospendService,
|
|
) {
|
|
parent::__construct($time);
|
|
// Run each day
|
|
$this->setInterval(24 * 60 * 60);
|
|
}
|
|
|
|
/**
|
|
* @param $argument
|
|
* @return void
|
|
*/
|
|
protected function run($argument): void {
|
|
$this->cospendService->cronAutoExport();
|
|
}
|
|
}
|