| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
* This interface defines methods that need to be implemented
* @param null $date
*/
public function saveLastRun($date = NULL) {
- $dao = new CRM_Core_DAO_Job();
- $dao->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();
}
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) {
}
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;
return FALSE;
}
- public function __destruct() {}
+ public function __destruct() {
+ }
+
}