diff options
author | Joas Schilling <coding@schilljs.com> | 2022-04-08 17:41:02 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-04-08 17:41:02 +0300 |
commit | 9f8c82774e8324f4b86dbbc43f54c0e04c74a425 (patch) | |
tree | 2c851db447f11daf54f547510811ed1114bd51d6 /lib | |
parent | e6191f6d7601142ca71624e53c6177c879167a76 (diff) |
Fix background job
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/BackgroundJobs/MonthlyReport.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/BackgroundJobs/MonthlyReport.php b/lib/BackgroundJobs/MonthlyReport.php index d634e6e..7f8620a 100644 --- a/lib/BackgroundJobs/MonthlyReport.php +++ b/lib/BackgroundJobs/MonthlyReport.php @@ -21,17 +21,15 @@ namespace OCA\Survey_Client\BackgroundJobs; -use OC\BackgroundJob\TimedJob; use OCA\Survey_Client\AppInfo\Application; use OCP\AppFramework\Http; +use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\IJob; +use OCP\BackgroundJob\TimedJob; class MonthlyReport extends TimedJob { - - /** - * MonthlyReport constructor. - */ - public function __construct() { + public function __construct(ITimeFactory $time) { + parent::__construct($time); // Run all 28 days $this->setInterval(28 * 24 * 60 * 60); // keeping time sensitive to not overload the target server at a single specific time of the day |