If you are using command wrappers in schedules that run as a background task, you can specify an Error Option as an additional, optional parameter. By including an Error Option, you can prevent a message box from appearing and delaying the complete processing of your script.
By using 2 as your Error Option parameter, you can send errors to Alarm History. By using 1 as your Error Option parameter, you can handle the error within your timer or event script. From there, for example, you can send it to the Windows Event Log.