Temp Job files in Repository and postJobScript task check

Hello I have two questions:

  1. I’m submitting a job file with -SubmitMultipleJobs and pointing to multiple job and plugin txt files. On a project these file can grow substantially. Is there a cmd or place I can save these in a deadline repo? So deadline can clean them up after the job are deleted? Or do I have to include this in a PostJobScript

  2. When using a PostJobScript in a job.info file, what’s the best way to test if all tasks have completed successfully to validate the job is complete?

Cheers

Once you submit the job, you no longer need these files, so you can delete them.

For your second question I would need to research a bit. There are similar examples in the Deadline documentation.

For the PostJobScript that should only fire after all the job’s tasks are marked ‘Completed’ so you shouldn’t need to.

Just ran a little test locally where I manually marked one of the tasks failed and the post-job script’s task was marked failed without running the script. So you should be able to get away without running that check.

thanks for taking a look Justin,
so when sending a file to deadline our database tags that version as a ‘wip’ state. I need the postJobScript to verify that the job completed to move it to a ‘published’ state. The part where I need some further checks are if one of the tasks fails or errors out. I’d like to tag it as ‘failed’ in our database.
So your saying if a task fails a posJobScript will never be executed then?
If so, is there a call back on the job to catch when a task errors out, so I can attach another database update script?

Thanks Mois, I thought about just wiping them on submit, though i wanted to keep them around until the job finishes for be duging purposes. I might put that clean upstep in the postJobScript now that i think about it.

You’ll want OnJobErrorCallback from the Event system for exactly that.

If all you’re doing is updating a database with state changes, an event plugin will be better suited for what it sounds like you’re doing. For example, if I manually mark a job completed from the Monitor the Post-Job script doesn’t run (because the task has been manually marked done) but OnJobCompleted still fires.

The jobinfo and plugininfo files do exist on the job under Job Properties->Submission Params, so you may be able to avoid keeping them around.

Thanks so much Justin. Sounds exactly what I am after

2 Likes