Skip to content

Commit

Permalink
Merge pull request #128 from nextcloud/bugfix/noid/fix-background-job
Browse files Browse the repository at this point in the history
Fix background job
  • Loading branch information
PVince81 authored Apr 8, 2022
2 parents e6191f6 + 9f8c827 commit 087521c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/BackgroundJobs/MonthlyReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 087521c

Please sign in to comment.