Sedrick Irvin scored on a 1-yard run with 19 seconds left to cap Stanford's rally from a 12-point deficit in the fourth quarter to beat San Jose State 30-29 on Saturday.