5.14. Evento ba_listastrabajo_programacioncall_mes
Nombre del evento:
|
event_mensual_ba_listastrabajo_programacioncall_mes
|
Tiempo de ejecución:
|
Último dia del mes, a las 23:58 horas
|
Tabla involucrada:
|
|
Declaracion SQL:
|
CREATE EVENT IF NOT EXISTS event_mensual_ba_listastrabajo_programacioncall_mes
ON SCHEDULE
EVERY 1 DAY
STARTS '2021-12-31 23:58:00'
COMMENT 'Creación de tabla mensual SP_ba_listastrabajo_mes'
DO
BEGIN
DECLARE rightnow DATETIME;
DECLARE hh,mm TINYINT;
SET rightnow = NOW();
SET hh = HOUR(rightnow);
SET mm = MINUTE(rightnow);
IF DATE(rightnow) = LAST_DAY(DATE(rightnow)) THEN
IF hh = 23 THEN
IF mm = 58 THEN
CALL SP_ba_listastrabajo_programacioncall_mes();
END IF;
END IF;
END IF;
END
|
Procedimiento involucrado:
|
|