diff --git a/pandora_console/extras/mr/44.sql b/pandora_console/extras/mr/44.sql
index c2f7676195..aaa2202e56 100644
--- a/pandora_console/extras/mr/44.sql
+++ b/pandora_console/extras/mr/44.sql
@@ -135,6 +135,21 @@ UPDATE `trecon_script` SET `description`='Specific Pandora FMS In
ALTER TABLE `trecon_task` MODIFY COLUMN `review_mode` TINYINT(1) UNSIGNED DEFAULT 1;
+DELETE FROM `tuser_task` WHERE id = 6;
+
+UPDATE `tuser_task` SET `parameters`='a:4:{i:0;a:6:{s:11:"description";s:28:"Report pending to be created";s:5:"table";s:7:"treport";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:2:{s:11:"description";s:426:"Save to disk in path";s:4:"type";s:6:"string";}i:2;a:2:{s:11:"description";s:16:"File nane prefix";s:4:"type";s:6:"string";}i:3;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' WHERE `id`=3;
+
+UPDATE `tuser_task_scheduled` SET
+ `args` = REPLACE (`args`, 'a:3', 'a:5'),
+ `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"PDF";s:15:"first_execution"')
+ WHERE `id_user_task` = 3;
+
+UPDATE `tuser_task_scheduled` SET
+ `id_user_task` = 3,
+ `args` = REPLACE (`args`, 'a:3', 'a:5'),
+ `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"XML";s:15:"first_execution"')
+ WHERE `id_user_task` = 6;
+
ALTER TABLE `ttag` MODIFY COLUMN `name` text NOT NULL default '';
COMMIT;
diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
index 8c204943db..2131b619a4 100644
--- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
+++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
@@ -2526,6 +2526,20 @@ ALTER TABLE `tnetflow_filter` MODIFY COLUMN `router_ip` text NOT NULL;
-- ----------------------------------------------------------------------
UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report";
INSERT IGNORE INTO tuser_task VALUES (8, 'cron_task_generate_csv_log', 'a:1:{i:0;a:2:{s:11:"description";s:14:"Send to e-mail";s:4:"type";s:4:"text";}}', 'Send csv log');
+UPDATE `tuser_task` SET `parameters`='a:4:{i:0;a:6:{s:11:"description";s:28:"Report pending to be created";s:5:"table";s:7:"treport";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:2:{s:11:"description";s:426:"Save to disk in path";s:4:"type";s:6:"string";}i:2;a:2:{s:11:"description";s:16:"File nane prefix";s:4:"type";s:6:"string";}i:3;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' WHERE `id`=3;
+DELETE FROM `tuser_task` WHERE id = 6;
+
+-- Migrate old tasks
+UPDATE `tuser_task_scheduled` SET
+ `args` = REPLACE (`args`, 'a:3', 'a:5'),
+ `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"PDF";s:15:"first_execution"')
+ WHERE `id_user_task` = 3;
+
+UPDATE `tuser_task_scheduled` SET
+ `id_user_task` = 3,
+ `args` = REPLACE (`args`, 'a:3', 'a:5'),
+ `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"XML";s:15:"first_execution"')
+ WHERE `id_user_task` = 6;
-- ----------------------------------------------------------------------
-- ADD message in table 'tnews'
@@ -3969,4 +3983,5 @@ SELECT `id_recon_script`,`type`, `name`, `description`, `script`, `macros` FROM
DELETE FROM `tconfig` WHERE `token` = 'ipam_installed';
-DELETE FROM `tconfig` WHERE `token` = 'ipam_recon_script_id';
\ No newline at end of file
+DELETE FROM `tconfig` WHERE `token` = 'ipam_recon_script_id';
+
diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php
index abc7d45984..dd51e10cb3 100644
--- a/pandora_console/include/functions_cron.php
+++ b/pandora_console/include/functions_cron.php
@@ -600,42 +600,6 @@ function cron_list_table()
$data[0] = '';
}
- $data[1] = $task['id_usuario'];
- $data[2] = db_get_value(
- 'name',
- 'tuser_task',
- 'id',
- $task['id_user_task']
- );
-
- $args = unserialize($task['args']);
- $report = reports_get_report($args[0]);
-
- // Check ACL in reports_get_report return false.
- if ($report === false) {
- continue;
- }
-
- $path = $args[1];
- $data[2] .= '
- '.__('Report').": ".$report['name'].'';
- $data[2] .= '
- '.__('Path').': '.$path.'';
- break;
-
- case 'cron_task_save_xml_report_to_disk':
- if ($write_perms || $manage_pandora) {
- $data[0] = '';
- $data[0] .= html_print_image(
- 'images/target.png',
- true,
- ['title' => __('Force run')]
- );
- $data[0] .= '';
- } else {
- $data[0] = '';
- }
-
$data[1] = $task['id_usuario'];
$data[2] = db_get_value('name', 'tuser_task', 'id', $task['id_user_task']);
$args = unserialize($task['args']);
@@ -647,9 +611,12 @@ function cron_list_table()
}
$path = $args[1];
+ $report_type = $args[3];
$data[2] .= '
- '.__('Report').": ".$report['name'].'';
$data[2] .= '
- '.__('Path').': '.$path.'';
+ $data[2] .= '
- '.__('Report type').': '.$report_type;
+
break;
case 'cron_task_do_backup':