AWS Thinkbox Discussion Forums

Pre/post task scripts not running

Hi,

I’m trying to run pre and post task python script on a 3ds max job but they don’t run. The exact same script runs on a pre/post job script though. It seems to me those script just aren’t called.

For a bit of background. I’m trying to change a windows environment variable before 3ds max is started.

import os

def main(*args):
#set the environment variable
os.environ[‘ADSK_3DSMAX_STARTUPSCRIPTS_ADDON_DIR’] = ‘custom startup scripts location’

#verify the environment variable has been set
print(“changed 3ds max user startup script dir to” + os.environ[‘ADSK_3DSMAX_STARTUPSCRIPTS_ADDON_DIR’])

The post/pre script passed from the 3ds Max submitter should write a jobInfo file flag under Deadline job which is submitted by the 3ds Max SMTD. Can you check the job submission param file under job setting? It should have a PreJobScript/PostJobScript flag set on the job. Feel free to share the archive job from the Deadline Monitor.

If it is not there, we might need to look into the code which is adding the submission flags.

This is how I add the pre and post task scripts to the submitter. The flag you’re talking about is the “runPreTaskScript” right?
image

They’re also present in the job properties on the Deadline Monitor

Privacy | Site terms | Cookie preferences