For some clients, you may want to run a command for a different application before running a TSM backup. For example, you may want to stop a database application, back up files with TSM, and then restart the application. To do this, you can schedule the running of a command file. Application clients and Tivoli Data Protection host servers require schedules that run command files.
A command file (also known as a macro or batch file on different operating systems) is stored on the client and contains a sequence of commands that are intended to be run during a scheduled start date and time window. Commands can include operating system commands, the TSM client's DSMC command, and commands for other applications. The default schedules do not support command files so you must create a new schedule to schedule command files.
To use command files, administrators must create schedules with the ACTION=MACRO parameter. For example, you can define a schedule called DAILY_INCR that will process a command file called c:\incr.cmd on the client:
define schedule standard daily_incr description="daily incremental file" action=macro objects="c:\incr.cmd" starttime=18:00 duration=5 durunits=minutes period=1 perunits=day dayofweek=any
Associate the client with the schedule and ensure that the scheduler is started on the client, application client, or Tivoli Data Protection host server directory. The schedule runs the file called c:\incr.cmd once a day between 6:00 p.m. and 6:05 p.m., every day of the week.