Ok, then just a suggestion to make your life easier especially since you're not recording the commands that get executed anywhere and you're not taking advantage of the safety of sp_ExecuteSQL...
There's no difference between your method of...
SELECT @CMD = 'EXEC msdb.dbo.sp_delete_backuphistory @oldest_date = ''' + @oldest_date + ''''
EXEC (@cmd)
...and the method of ...
EXEC msdb.dbo.sp_delete_backuphistory @oldest_date = @oldest_date
...except that your method is more complex, which makes it more subject to error, and more susceptible to SQL Injection attacks for any procs that do have parameters (this one admittedly doesn't).
--Jeff Moden
Change is inevitable... Change for the better is not.