Remove unessessary date vars and re-enable cron key check for the new cron mailer

This commit is contained in:
johnnyq 2023-06-20 20:37:20 -04:00
parent 8b372c20e0
commit 63100d7cee
1 changed files with 4 additions and 12 deletions

View File

@ -24,9 +24,9 @@ if ($config_enable_cron == 0) {
}
// Check Cron Key
//if ( $argv[1] !== $config_cron_key ) {
// exit("Cron Key invalid -- Quitting..");
//}
if ( $argv[1] !== $config_cron_key ) {
exit("Cron Key invalid -- Quitting..");
}
/*
* ###############################################################################################################
@ -39,10 +39,6 @@ mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Cron', log_action = 'Sta
// Process Mail Queue
// Get date for search
$today = new DateTime();
$today_text = $today->format('Y-m-d');
// Get Mail Queue that hasnt been sent yet
// Email Status: 0 Queued, 1 Sending, 2 Failed, 3 Sent
$sql_queue = mysqli_query($mysqli, "SELECT * FROM email_queue WHERE email_status = 0");
@ -93,11 +89,7 @@ if (mysqli_num_rows($sql_queue) > 0) {
}
}
// Process Failed Mail Queued up to 4 times every 30 mins
// Get date for search
$today = new DateTime();
$today_text = $today->format('Y-m-d');
// Process Failed Mail up to 4 times every 30 mins
// Get Mail Queue that hasnt been sent yet
// Email Status: 0 Queued, 1 Sending, 2 Failed, 3 Sent