1<?php
2/**
3 * Nextcloud - Cospend
4 *
5 * This file is licensed under the Affero General Public License version 3 or
6 * later. See the COPYING file.
7 *
8 */
9
10namespace OCA\Cospend\Cron;
11
12use OC\BackgroundJob\TimedJob;
13use OCA\Cospend\Service\ProjectService;
14
15class AutoExport extends TimedJob {
16
17	/**
18	 * @var ProjectService
19	 */
20	private $projectService;
21
22	public function __construct(ProjectService $projectService) {
23		// Run each day
24		$this->setInterval(24 * 60 * 60);
25		$this->projectService = $projectService;
26	}
27
28	protected function run($argument) {
29//		$d = new DateTime();
30		$this->projectService->cronAutoExport();
31	}
32}
33