summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-03-11 13:47:13 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-03-11 14:18:42 +0100
commitac2d1cc7e4de0632d458c69d3305c72d1d4b6156 (patch)
treed0d862fae15ee15d0e8342b383a7213b849a8741
parentafbfe2ad7df10b3d90555dee1089030b6bfd25b5 (diff)
#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)
-rw-r--r--admin/WebConsole/comandos/gestores/gestor_Comandos.php8
-rw-r--r--admin/WebConsole/gestores/gestor_ejecutaracciones.php7
2 files changed, 2 insertions, 13 deletions
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);
}