Cloud Connect Services


The CC2 EXECUTE feature is used to submit a job ticket to a RedTitan server. The ticket is a text file held in a user CC2 storage account. A job ticket may not be executed in the root folder.

e.g.

  type=job ticket
  run=escapee u.idf /pdf /x 


type=job ticketRequired. Identifies the text file as a CC2 execute ticket.
run=commandRequired. Command to be processed. See application documentation
files=listOptional. A comma separated list of files that are imported from the user storage account to be available to the running application. If this line is omitted all files in the storage account folder where the job ticket is located are imported (script interface job ticket must have a files list parameter).
timeout=secondsOptional. Timeout in seconds allowed for job completion. Maximim 60. Defaults to 30 seconds.

Using CC2 from Windows command line


  cc2 upload (localfilename) (blobfoldername)
  cc2 download (blobname)|(http(s) url) (localfilename)
  cc2 execute (blobname)
  cc2 delete (blobname)
  cc2 browse (blobname)
 
blobnameA name that ends with "/" e.g. cc2demo2/subfolder/ is a reference to a blob folder. Blobs or blob folders containing the text ".job" is treated as a shorthand that refers to the lastest job execution folder. e.g. cc2demo2/cc2demo2.txt.job/cc2demo2.pdf.job may be expanded to cc2demo2/cc2demo2.txt.job10005/cc2demo2.pdf.job/

Windows CC2 Scripting example

rem Dowload the resources for this demo
cc2 download https://cc2.co/resources/cc2/w9.html w9.html
cc2 download https://cc2.co/resources/cc2/cc2demo2.txt cc2demo2.txt
cc2 download https://cc2.co/resources/cc2/w9original.pdf w9.pdf
cc2 download https://cc2.co/resources/cc2/w9.js w9.js

rem This script makes an EE file for EscapeE
cscript w9.js

rem Upload the job ticket to CC2 Azure blob storage
cc2 upload cc2demo2.txt cc2demo2/


rem Upload the HTML file to CC2 Azure blob storage
cc2 upload w9.html cc2demo2/

rem upload the PDF background to CC2 Azure blob storage
cc2 upload w9.pdf cc2demo2/

rem EE field definition to CC2 Azure blob storage
cc2 upload w9.ee cc2demo2/

rem Execute the job ticket
cc2 execute cc2demo2/cc2demo2.txt

rem Download the completed job ticket
cc2 download cc2demo2/cc2demo2.txt.job/cc2demo2.pdf cc2demo2.pdf

rem view the result
cc2demo2.pdf

rem Remove latest job execution folder
cc2 delete cc2demo2/cc2demo2.txt.job/