Begin and GO in TSQL
GO is not a Transact-SQL statement, instead it is a command
recognized by the Sql Server Management Studio (i.e. SSMS), SQLCMD
and OSQL utilities. These utilities send all statements after the
previous GO statement and before the current GO statement as one
Batch to the Sql Server engine for execution. It should work in a
scheduler
It looks like your transaction failed, got rolled back and there is nothing to commit.


This will NOT run

CREATE TABLE Test
(
    id INT PRIMARY KEY NOT NULL
);
GO


BEGIN TRAN;
INSERT Test
VALUES
('a');
GO
COMMIT TRAN;



  Msg 245, Level 16, State 1, Line 6 Conversion failed when converting
  the varchar value 'a' to data type int. Msg 3902, Level 16, State 1,
  Line 9 The COMMIT TRANSACTION request has no corresponding BEGIN
  TRANSACTION.


This will run without a problem

CREATE TABLE Test
(
    id INT PRIMARY KEY NOT NULL
);
GO

BEGIN TRAN;
INSERT Test
VALUES
(5);
GO

COMMIT TRAN;


A good article on transactions  http://www.sommarskog.se/error_handling/Part1.html