X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FScheduledJob.php;h=eb320eedffcce05595bb4b57378bcb9e06cda7a1;hb=4846df9154866b0a33ee8ec7a1f48c65c77b670b;hp=742772bd6766e1a5fbd7e747b0a5728dd09b630b;hpb=1861d923dd4e29ac945caa98e1efbeda0bb71483;p=civicrm-core.git diff --git a/CRM/Core/ScheduledJob.php b/CRM/Core/ScheduledJob.php index 742772bd67..eb320eedff 100644 --- a/CRM/Core/ScheduledJob.php +++ b/CRM/Core/ScheduledJob.php @@ -1,7 +1,7 @@ id = $this->id; + $dao = new CRM_Core_DAO_Job(); + $dao->id = $this->id; $dao->last_run = ($date == NULL) ? CRM_Utils_Date::currentDBDate() : CRM_Utils_Date::currentDBDate($date); $dao->save(); } @@ -101,7 +101,7 @@ class CRM_Core_ScheduledJob { return TRUE; case 'Hourly': - $now = CRM_Utils_Date::currentDBDate(); + $now = CRM_Utils_Date::currentDBDate(); $hourAgo = strtotime('-1 hour', strtotime($now)); $lastRun = strtotime($this->last_run); if ($lastRun < $hourAgo) { @@ -109,8 +109,8 @@ class CRM_Core_ScheduledJob { } case 'Daily': - $now = CRM_Utils_Date::currentDBDate(); - $dayAgo = strtotime('-1 day', strtotime($now)); + $now = CRM_Utils_Date::currentDBDate(); + $dayAgo = strtotime('-1 day', strtotime($now)); $lastRun = strtotime($this->last_run); if ($lastRun < $dayAgo) { return TRUE; @@ -120,6 +120,7 @@ class CRM_Core_ScheduledJob { return FALSE; } - public function __destruct() {} -} + public function __destruct() { + } +}