If jobs are submitted via an xml batch file or as a result of a server query this will result in a separate task in the queue for each clip or file being processed. Actions defined on the Conversions and Post-Processing tabs, such as renaming the file or executing commands, will apply to each clip in turn, which may not be what you want if you want to process all the clips as a single batch. The following operations apply to an entire batch of clips in one go:

  • You can export all the clips matching a server query into one HTML or XML file using the Batch Export section on the Parameters tab. This export is done once, before the individual files are processed. This applies to server queries only.
  • To execute a command just once on completion of the batch (perhaps to submit all the clips to an external system in one go) use the special “Execute command 4” field on the Post-Processing tab. This applies to both server queries and batch file imports.
  • Write a shell script to invoke the worker command line interface (see below).

The following special variables are available on batch completion and when naming the XML or HTML file to use:

$I        comma-separated list of server clip IDs (for server queries)

$B       the batch file name (for xml batch jobs)

$n        total number of tasks processed in this batch

$m       of this total, how many completed successfully

$c        all the files processed by the batch (concatenated as one value)

$l         all the files processed by the batch (as a list of separate values)

Also $j, $u, $U, $D, $M, $T, $_d, $_m, $_y have the same value as during normal task execution.

If you need to update the clips on the server during the batch completion phase you can do so using the worker command line by passing in the clip ID list, for example:

catdv -query ID:65:$I -set Status=Complete

You can monitor the status of a batch by looking at the batch id column in the task list and the batch details section on the details page for an individual task.