From 8192c49a3848a7bebf0a5594a8abfb0ce13bfeb9 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Tue, 19 Jul 2022 14:29:02 -0400 Subject: [PATCH] Added Cron Job Start to Logging --- cron.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cron.php b/cron.php index f1c04915..d6d627f7 100644 --- a/cron.php +++ b/cron.php @@ -47,6 +47,9 @@ while($row = mysqli_fetch_array($sql_companies)){ if($config_enable_cron == 1){ + //Logging + mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Cron', log_action = 'Started', log_description = 'Cron started for $company_name', company_id = $company_id"); + if($config_backup_enable == 1){ // DATABASE BACKUP // This needs to be set to the full file system path or else when cron runs php it will break cron.php and cron will not run properly @@ -470,7 +473,7 @@ while($row = mysqli_fetch_array($sql_companies)){ //Send Alert to inform Cron was run mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Cron', notification = 'Cron.php successfully executed', notification_timestamp = NOW(), company_id = $company_id"); //Logging - mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Cron', log_action = 'Executed', log_description = 'Cron executed successfully for $company_name', company_id = $company_id"); + mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Cron', log_action = 'Ended', log_description = 'Cron executed successfully for $company_name', company_id = $company_id"); } //End Cron Check } //End Company Loop through