bugfixing but not finished
This commit is contained in:
@@ -273,17 +273,17 @@ if(isFroxlorVersion('0.9-r3'))
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`cronfile` varchar(250) NOT NULL,
|
||||
`lastrun` int(15) NOT NULL DEFAULT '0',
|
||||
`interval` varchar(100) DEFAULT '5 MINUTES',
|
||||
`interval` varchar(100) DEFAULT '5 MINUTE',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;");
|
||||
|
||||
lastStepStatus(0);
|
||||
showUpdateStep("Inserting new values into table");
|
||||
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (1, 'cron_tasks.php', '5 MINUTES');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (2, 'cron_legacy.php', '5 MINUTES');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (3, 'cron_apsinstaller.php', '5 MINUTES');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (4, 'cron_autoresponder.php', '5 MINUTES');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (1, 'cron_tasks.php', '5 MINUTE');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (2, 'cron_legacy.php', '5 MINUTE');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (3, 'cron_apsinstaller.php', '5 MINUTE');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (4, 'cron_autoresponder.php', '5 MINUTE');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (5, 'cron_apsupdater.php', '1 HOUR');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (6, 'cron_traffic.php', '1 DAY');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `cronfile`, `interval`) VALUES (7, 'cron_used_tickets_reset.php', '1 MONTH');");
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
function getIntervalOptions()
|
||||
{
|
||||
global $db, $lng;
|
||||
global $db, $lng, $cronlog;
|
||||
|
||||
$query = "SELECT DISTINCT `interval` FROM `" . TABLE_PANEL_CRONRUNS . "` ORDER BY `interval` ASC;";
|
||||
$result = $db->query($query);
|
||||
@@ -33,7 +33,7 @@ function getIntervalOptions()
|
||||
}
|
||||
else
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_ERROR, "Invalid SQL-Interval ".$row['interval']." detected. Please fix this in the database.");
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERROR, "Invalid SQL-Interval ".$row['interval']." detected. Please fix this in the database.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
*/
|
||||
function getNextCronjobs()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT `id`, `cronfile` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `interval` <> '0' AND (";
|
||||
/*
|
||||
* 5M - 5 minute cronjob (reqular)
|
||||
*/
|
||||
|
||||
$intervals = getIntervalOptions();
|
||||
|
||||
$x = 0;
|
||||
@@ -43,7 +43,7 @@ function getNextCronjobs()
|
||||
$x++;
|
||||
}
|
||||
|
||||
$sql.= ');';
|
||||
$sql.= ');';
|
||||
|
||||
$result = $db->query($query);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user