implemented cron in open
This commit is contained in:
parent
19a9f82fe1
commit
831ed2570d
|
@ -160,10 +160,9 @@ class DiscoveryTaskList extends HTML
|
||||||
return $this->enableTask();
|
return $this->enableTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enterprise_installed()) {
|
enterprise_hook('tasklist_checkrunning');
|
||||||
// This check only applies to enterprise users.
|
|
||||||
enterprise_hook('tasklist_checkrunning');
|
|
||||||
|
|
||||||
|
if (enterprise_installed()) {
|
||||||
$ret = $this->showListConsoleTask();
|
$ret = $this->showListConsoleTask();
|
||||||
} else {
|
} else {
|
||||||
$ret = false;
|
$ret = false;
|
||||||
|
|
|
@ -200,9 +200,7 @@ class ConsoleSupervisor
|
||||||
* NOTIF.CRON.CONFIGURED
|
* NOTIF.CRON.CONFIGURED
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (enterprise_installed()) {
|
$this->checkCronRunning();
|
||||||
$this->checkCronRunning();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if instance is registered.
|
* Check if instance is registered.
|
||||||
|
@ -2651,14 +2649,20 @@ class ConsoleSupervisor
|
||||||
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
|
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
|
||||||
$message_conf_cron .= __('Discovery relies on an appropriate cron setup.');
|
$message_conf_cron .= __('Discovery relies on an appropriate cron setup.');
|
||||||
$message_conf_cron .= '. '.__('Please, add the following line to your crontab file:');
|
$message_conf_cron .= '. '.__('Please, add the following line to your crontab file:');
|
||||||
$message_conf_cron .= '<b><pre class=""ui-dialog>* * * * * <user> wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies ';
|
if (enterprise_installed()) {
|
||||||
$message_conf_cron .= str_replace(
|
$message_conf_cron .= '<b><pre class=""ui-dialog>* * * * * <user> wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies ';
|
||||||
ENTERPRISE_DIR.'/meta/',
|
$message_conf_cron .= str_replace(
|
||||||
'',
|
ENTERPRISE_DIR.'/meta/',
|
||||||
ui_get_full_url(false)
|
'',
|
||||||
);
|
ui_get_full_url(false)
|
||||||
$message_conf_cron .= ENTERPRISE_DIR.'/'.EXTENSIONS_DIR;
|
);
|
||||||
$message_conf_cron .= '/cron/cron.php >> </pre>';
|
$message_conf_cron .= ENTERPRISE_DIR.'/'.EXTENSIONS_DIR;
|
||||||
|
$message_conf_cron .= '/cron/cron.php >> </pre>';
|
||||||
|
} else {
|
||||||
|
$message_conf_cron .= '<b><pre class=""ui-dialog>* * * * * <user> wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies ';
|
||||||
|
$message_conf_cron .= ui_get_full_url(false).'cron.php >> </pre>';
|
||||||
|
}
|
||||||
|
|
||||||
$message_conf_cron .= $config['homedir'].'/log/cron.log</pre>';
|
$message_conf_cron .= $config['homedir'].'/log/cron.log</pre>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -463,7 +463,6 @@ function cron_list_table()
|
||||||
);
|
);
|
||||||
|
|
||||||
$defined_tasks = db_get_all_rows_sql($sql);
|
$defined_tasks = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
if (!check_acl($config['id_user'], 0, 'PM')) {
|
if (!check_acl($config['id_user'], 0, 'PM')) {
|
||||||
$read_tasks = [];
|
$read_tasks = [];
|
||||||
foreach ($defined_tasks as $task) {
|
foreach ($defined_tasks as $task) {
|
||||||
|
|
Loading…
Reference in New Issue