Creates a scheduled task. The @cmdexecsuccesscode parameter has been added.
For additional syntax information for sp_addtask, see SQL Server Books Online or the Microsoft SQL Server Transact-SQL Reference.
sp_addtask name[, subsystem] [, server] [, username] [, databasename]
[, enabled] [, freqtype] [, freqinerval] [, freqsubtype] [, freqsubinterval]
[, freqrelativeinterval] [, freqrecurrencefactor] [, activestartdate]
[, activeenddate] [, activestarttimeofday] [, activeendtimeofday]
[, nextrundate] [, nextruntime] [, runpriority] [, emailoperatorname]
[, retryattempts] [, retrydelay] [, command] [, loghistcompletionlevel]
[, emailcompletionlevel] [, description] [, tagadditionalinfo] [, tagobjectid]
[, tagobjecttype] [, @newid OUTPUT] [, @cmdexecsuccesscode]
where