Processing events for the job drop folders can be configured here:

convert_server_cfg_events

There are three types of the processing events:

Select/deselect the processing event(s) in the right hand part of the window for its activation/deactivation.

setup_button

To configure the event parameters, choose the processing event from the list in the right hand part of the window and press the "Setup…​" button.

Pre-Processing Event

A pre-processing event is one that is called up before a new job is processed.

pre-processing-event_fmt

The pre-processing event can be activated/deactivated in the "Processing Events" dialog or directly in the "Pre-processing Event" configuration window by selecting/deselecting the "Active" option.

Select the "Execute the OS command" checkbox to activate the corresponding fields.

insert_macro

To insert the macros for the current pre-processing event, click the "Insert macro" link and choose the macros from the list that appears:

macro_list

Note
The description of the macros appears at the bottom of the window when you point the cursor to that macro.
Note
The list of the macros may vary depending on the job type.

Select the "Don’t continue job processing until execution is finished" option to suspend the work of Cinegy Convert Server (Legacy) until this pre-processing command execution is finished.

To define the waiting period before stopping the process, select the desired "Timeout before process kill (seconds)" value from the pull-down list.

Select the "Suppress GUI" option to hide the processing console window when execution of the processing command is in progress.

Select the "Update descriptors" checkbox to enable updating the descriptors in the processed (target) object. Fill in the "Descriptor internal name" field and set a desired value for this descriptor via the keyboard or using the corresponding macro.

Note
The descriptor will be updated only if the processed object contains the defined metadata field.
Note
Make sure that the descriptor internal name entered is identical with the corresponding descriptor internal name in Cinegy Archive Manager.
Important
Refer to the Descriptors, Presets article within the Cinegy Archive Manager Manual to learn more about metadata descriptors.

Post-Processing Event

A post-processing event is one that starts after Cinegy Convert Server (Legacy) has completed processing the current job.

post-processing_event

The configuration of the post-processing event is the same as the pre-processing event configuration.

Additional Macros

Along with the macros common for all three processing events types, Cinegy Convert (Legacy) supports additional macros special for file export post-processing events:

  • {OutputFile} – output file name. Use {OutputFileN}, where N is an ordinal file number starting with 0.

  • {OutputAAF} – output AAF file name. This macro is available only for the Avid export job drop folders. Use {OutputAAFN}, where N is an ordinal file number starting with 0.

Note
Note that macros {OutputFile0} and {OutputFile} as well as {OutputAAF0} and {OutputAAF} are identical.

Script Examples

Here is an example of the Visual Basic script for sending an email from Cinegy Convert Server (Legacy) as a post-processing event. The incoming arguments are the recipient address, subject and body.

Const schema   = "http://schemas.microsoft.com/cdo/configuration/"
Const cdoBasic = 1
Const cdoSendUsingPort = 2
Dim oMsg, oConf, toAddress, subject, body

args = WScript.Arguments.Count

If args < 3 then
   WScript.Echo "usage: sendemail.vbs toaddress subject body"
   WScript.Quit
end If

toAddress = WScript.Arguments.Item(0)
subject = WScript.Arguments.Item(1)
body = WScript.Arguments.Item(2)

Wscript.Echo "Sending email to " & toAddress & " with subject " & subject & " and body " & vbCrLf & vbCrLf & body

' E-mail properties
Set oMsg      = CreateObject("CDO.Message")
oMsg.From     = "cinegydemo@googlemail.com"  ' or "Sender Name <from@gmail.com>"
oMsg.To       = toAddress
oMsg.Subject  = subject
oMsg.TextBody = body

' GMail SMTP server configuration and authentication info
Set oConf = oMsg.Configuration
oConf.Fields(schema & "smtpserver")       = "smtp.gmail.com"
oConf.Fields(schema & "smtpserverport")   = 465
oConf.Fields(schema & "sendusing")        = cdoSendUsingPort
oConf.Fields(schema & "smtpauthenticate") = cdoBasic
oConf.Fields(schema & "smtpusessl")       = True
oConf.Fields(schema & "sendusername")     = "cinegydemo@googlemail.com"
oConf.Fields(schema & "sendpassword")     = "yourpasswordforyouremailabovegoeshere"
oConf.Fields.Update

oMsg.Send

Another script example is a Windows PowerShell script for uploading the processed files to FTP. This script takes a single argument (a file name) and uploads this to a predefined folder location on a predefined FTP server.

Param([string]$filefullname="C:\Data\Scripting\ConvertOutput\User4")
# create the FtpWebRequest and configure it
$filefullname.Length
$filename = Split-Path  -Leaf $filefullname
$ftp = [System.Net.FtpWebRequest]::Create("ftp://download.example.com/SomeFolder/$filename")
$ftp = [System.Net.FtpWebRequest]$ftp
$ftp.Method = [System.Net.WebRequestMethods+Ftp]::UploadFile
$ftp.Credentials = new-object System.Net.NetworkCredential("ftp-exchange","yourpassword")
$ftp.UseBinary = $true
$ftp.UsePassive = $true
# read in the file to upload as a byte array
$content = [System.IO.File]::ReadAllBytes($filefullname)
$ftp.ContentLength = $content.Length
# get the request stream, and write the bytes into it
$rs = $ftp.GetRequestStream()
$rs.Write($content, 0, $content.Length)
# be sure to clean up after ourselves
$rs.Close()
$rs.Dispose()

The configuration of the post processing event is as follows:

post-processing_sample

Please note, the command arguments double and single quote delimit the {OutputFile} macro – since the PowerShell EXE removes the first double-quote when running the argument before passing into the PS1 script. The line looks like this in text:

"C:\Data\Dev\Scripts\FTPUpload.ps1" "'{OutputFile}'"

Also it is required to provide permission for PowerShell to run scripts (details here).

Error-Processing Event

An error-processing event is one that starts if the current job has been processed with the "Failed" status.

error-processing_event

The configuration of the error-processing event is the same as the pre-processing event configuration.

Cinegy Convert (Legacy) also supports additional macros special for file export error-processing events.

Important
Refer to the Additional Macros paragraph for details on special macros and their meanings.