From 276eed81c7d254afe34aeb2847836315e3210956 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 22 Apr 2024 23:57:29 +0200 Subject: [PATCH] set last run --- application/controllers/Eqsl.php | 4 ++++ application/controllers/Hrdlog.php | 3 +++ application/controllers/Lotw.php | 3 +++ application/controllers/Qrz.php | 3 +++ application/controllers/Update.php | 4 ++++ 5 files changed, 17 insertions(+) diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index a9df20929..f1296bdc8 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -713,6 +713,10 @@ class eqsl extends CI_Controller { * Used for CRON job */ public function sync() { + + $this->load->model('cron_model'); + $this->cron_model->set_last_run('sync_eqsl'); + ini_set('memory_limit', '-1'); set_time_limit(0); $this->load->model('eqslmethods_model'); diff --git a/application/controllers/Hrdlog.php b/application/controllers/Hrdlog.php index 2b3182b49..a8bfdc299 100644 --- a/application/controllers/Hrdlog.php +++ b/application/controllers/Hrdlog.php @@ -25,6 +25,9 @@ class Hrdlog extends CI_Controller { public function upload() { $this->setOptions(); + $this->load->model('cron_model'); + $this->cron_model->set_last_run('upload_hrd'); + $this->load->model('logbook_model'); $station_ids = $this->logbook_model->get_station_id_with_hrdlog_code(); diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 0f25b67e4..5115b98af 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -198,6 +198,9 @@ class Lotw extends CI_Controller { echo "You must install php OpenSSL for LoTW functions to work"; } + $this->load->model('cron_model'); + $this->cron_model->set_last_run('upload_lotw'); + // Get Station Profile Data $this->load->model('Stations'); diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php index d08edc26d..d2950eae2 100644 --- a/application/controllers/Qrz.php +++ b/application/controllers/Qrz.php @@ -29,6 +29,9 @@ class Qrz extends CI_Controller { public function upload() { $this->setOptions(); + $this->load->model('cron_model'); + $this->cron_model->set_last_run('upload_qrz'); + $this->load->model('logbook_model'); $station_ids = $this->logbook_model->get_station_id_with_qrz_api(); diff --git a/application/controllers/Update.php b/application/controllers/Update.php index 10e72ea00..5ba19f067 100644 --- a/application/controllers/Update.php +++ b/application/controllers/Update.php @@ -305,6 +305,10 @@ class Update extends CI_Controller { } public function update_clublog_scp() { + + $this->load->model('cron_model'); + $this->cron_model->set_last_run('clublog_scp'); + $strFile = $this->make_update_path("clublog_scp.txt"); $url = "https://cdn.clublog.org/clublog.scp.gz"; set_time_limit(300);