pandorafms/pandora_console/cron.php

32 lines
651 B
PHP
Raw Normal View History

2023-09-27 11:42:21 +02:00
<?php
require_once 'include/config.php';
require_once 'include/auth/mysql.php';
require_once 'include/functions.php';
require_once 'include/functions_db.php';
2023-09-27 18:28:12 +02:00
global $config;
if ((bool) $config['enterprise_installed'] === true) {
2023-09-27 11:42:21 +02:00
return;
}
2023-09-27 11:44:26 +02:00
2023-09-27 11:42:21 +02:00
// Load classes.
require_once 'include/class/DiscoveryConsoleTask.php';
require_once 'include/class/ConsoleSupervisor.php';
db_process_sql_update(
'tconfig',
['value' => get_system_time()],
['token' => 'cron_last_run']
);
$tasks = new DiscoveryConsoleTask();
$tasks->run();
if (is_reporting_console_node() === true) {
$supervisor = new ConsoleSupervisor();
$supervisor->run();
2023-09-27 18:28:12 +02:00
}