fix task schedule executed twice bug