Added handle trigger method to schedule code.