diff options
Diffstat (limited to 'admin/WebConsole')
-rw-r--r-- | admin/WebConsole/comandos/gestores/gestor_Comandos.php | 2 | ||||
-rw-r--r-- | admin/WebConsole/includes/restfunctions.php | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/admin/WebConsole/comandos/gestores/gestor_Comandos.php b/admin/WebConsole/comandos/gestores/gestor_Comandos.php index f8b283d4..e6ba4ef7 100644 --- a/admin/WebConsole/comandos/gestores/gestor_Comandos.php +++ b/admin/WebConsole/comandos/gestores/gestor_Comandos.php @@ -257,7 +257,7 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){ if($sw_ejya=='on'){ if ($sw_seguimiento == 1) { $when = now_params(); - $resul = create_schedule(strval($sesion), + $resul = create_schedule_now(strval($sesion), $EJECUCION_PROCEDIMIENTO, "", $when['map_year'], $when['map_month'], diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index b0ae084e..e7b1e1e6 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -619,6 +619,30 @@ function create_schedule($task_id, $type, $name, $years, $months, $weeks, return common_request(OG_REST_CMD_CREATE_SCHEDULE, POST, $data); } +function create_schedule_now($task_id, $type, $name) { + $type_string; + + switch ($type) { + case TYPE_COMMAND: + $type_string = OG_SCHEDULE_COMMAND; + break; + case TYPE_PROCEDURE: + $type_string = OG_SCHEDULE_PROCEDURE; + break; + case TYPE_TASK: + default: + $type_string = OG_SCHEDULE_TASK; + } + + $data = array ( + OG_REST_PARAM_TASK => $task_id, + OG_REST_PARAM_TYPE => $type_string, + OG_REST_PARAM_NAME => $name, + ); + + return common_request(OG_REST_CMD_CREATE_SCHEDULE, POST, $data); +} + function delete_schedule($schedule_id) { $data = array ( |