设定从某个时间执行脚本,直到现在

CREATE DEFINER=`game`@`%` PROCEDURE `sp_call_spec_days`(in procedure_code int,IN begin_date date)
BEGIN

select begin_date into @handle_date;

REPEAT
select @handle_date;

IF (procedure_code = 1) THEN
call sp_player_platform_anyday_snapshot(@handle_date);
select procedure_code;
END IF;

set @handle_date = @handle_date + INTERVAL 1 DAY;
UNTIL @handle_date = CURDATE() END REPEAT;
END

posted @ 2017-02-07 15:09  糖饼好吃  阅读(171)  评论(0编辑  收藏  举报