AWS Thinkbox Discussion Forums

deadline v2.6 & PostJobScript - need help

hello

deadline v2.6 not support setup PostJobScript with submit job… script can set manually after submit…
we cant replace deadline to new version and i find a way how use it.

i do:

  1. submit job from maya (fusion and etc)
  2. open job-file and write postJobScriopt into
  3. add a Queue file for script

after that all Monitors see a PostJobScript, but server not render that… i think server cashe a job and my changes not work.

how tell a server reread a job after i change it?

i try use deadline inline command to set a script:
MEL:
string $str = “c:/deadline/bin/DeadlineCommand.exe -SetJobSetting " + $job + " PostJobScript MK_Report.vbs”;
system( $str );

it set a job, but job have status “Deleted”… it correct only if i create a null file job-task… but script not worked - server not run it…
script worked only if i set it manually in deadline-monititor… :frowning:

First, we always recommend that you upgrade to the latest version of the Deadline software. Deadline 2.7 is primarily a maintenance release that doesn’t break any existing features and adds new ones like the ability to specify a post job script on submission. As long as your support and upgrade contract is up to date, you can get a 2.7 license at no additional cost, and upgrading Deadline simply involves running the 2.7 Repository installer over the existing 2.6 installation:
franticfilms.com/software/su … rading.php

If upgrading to 2.7 isn’t a possibility though, try this modified approach to what you’re doing:

  1. submit job from maya (fusion and etc)
  2. open job-file and write postJobScriopt into
  • AND increase the TaskCount setting by 1 (if it’s currently 10, set it to 11)
  1. add a Queue file for script

Incrementing the TaskCount setting is likely the missing piece of the puzzle here. Give this a try and let us know if you have any luck.

Cheers,

  • Ryan

YES! his alive!! :slight_smile:
i do that MEL script:

string $deadline_server = "//SPMSERV/DeadlineRepository/jobs/";
string $buff[];
string $allFile = "";

string $buff[];
tokenize $Deadline_JobID "\n" $buff;
string $job = $buff[0];

int $count = `playbackOptions -q -max` - `playbackOptions -q -min` + 1;

// read job-file into memory
$fp = `fopen ($deadline_server + $job + "/" + $job + ".job") "r"`;
string $nextLine = `fgetline $fp`;
while ( size( $nextLine ) > 0 ) 
{
	$allFile += $nextLine;
	$nextLine = `fgetline $fp`;
}
fclose $fp;

// replace  PostJobScript tag in job
$allFile = `substitute "<PostJobScript />" $allFile  "<PostJobScript>\\\\Spmserv\\DeadlineRepository\\scripts\\MK_Report\\MK_Report.vbs</PostJobScript>"`;
// replace TaskCount tag in job
$allFile = `substitute ("<TaskCount>" + $count + "</TaskCount>") $allFile ("<TaskCount>" + ($count + 1) + "</TaskCount>")`;

// write modified job
$fp = `fopen ($deadline_server + $job + "/" + $job + ".job") "w"`;
fwrite $fp $allFile;
fclose $fp;

// create a new task-file for a job
$fp = `fopen ($deadline_server + $job + "/Queued/" + $job + "_99999_99999-99999.task") "w"`;
fclose $fp;

that script run after submit maya scene to deadline…
thanks…

Privacy | Site terms | Cookie preferences