From ac2d1cc7e4de0632d458c69d3305c72d1d4b6156 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 11 Mar 2021 13:47:13 +0100 Subject: #1032 Use create_schedule_now for tasks and procedures Commit afbfe2a introduced create_schedule_now for commands. Adapt procedures and task to use it instead. Drop $when variable as it is no longer needed for "immediate scheduling" execution of commands, procedures or tasks. Fixes: afbfe2a (Use create_schedule_now for immediate logged commands) --- admin/WebConsole/comandos/gestores/gestor_Comandos.php | 8 +------- admin/WebConsole/gestores/gestor_ejecutaracciones.php | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'admin') diff --git a/admin/WebConsole/comandos/gestores/gestor_Comandos.php b/admin/WebConsole/comandos/gestores/gestor_Comandos.php index e6ba4ef7..c58c1981 100644 --- a/admin/WebConsole/comandos/gestores/gestor_Comandos.php +++ b/admin/WebConsole/comandos/gestores/gestor_Comandos.php @@ -256,15 +256,9 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){ $script=@urldecode($ValorParametros["scp"]); if($sw_ejya=='on'){ if ($sw_seguimiento == 1) { - $when = now_params(); $resul = create_schedule_now(strval($sesion), $EJECUCION_PROCEDIMIENTO, - "", $when['map_year'], - $when['map_month'], - 0, 0, $when['map_day'], - $when['map_hour'], - $when['map_am_pm'], - $when['map_minute']); + ""); } else { run_command($idcomando, $cadenaip, $cadenamac, $atributos); } diff --git a/admin/WebConsole/gestores/gestor_ejecutaracciones.php b/admin/WebConsole/gestores/gestor_ejecutaracciones.php index 5349e1d0..90aa5771 100644 --- a/admin/WebConsole/gestores/gestor_ejecutaracciones.php +++ b/admin/WebConsole/gestores/gestor_ejecutaracciones.php @@ -243,12 +243,7 @@ function insertaComando($idcomando,$parametros,$idprocedimiento,$ambito,$idambit "WHERE idaccion = @sesion"; $resul=$cmd->Ejecutar(); if (resul) { - $when = now_params(); - $resul = create_schedule(strval($sesion), $EJECUCION_PROCEDIMIENTO, "", - $when['map_year'], $when['map_month'], - 0, 0, $when['map_day'], - $when['map_hour'], $when['map_am_pm'], - $when['map_minute']); + $resul = create_schedule_now(strval($sesion), $EJECUCION_PROCEDIMIENTO, ""); } return(true); } -- cgit v1.2.3-18-g5258