User Email Notification on Fail


#1

Hello,

I am sorry for the many posts. Since I am trying to set up Deadline work as we want it here, I am going through the email notification settings.

Now I know that each user can set up to receive emails for their own job. But I want to set up this globally.

For example every time a job fails I want deadline to send an email to me, and the user. Now the me part is easy since it’s just my email. Is there a way to put an address there that correlates to each job’s user?

Thanks.


#2

Nothing magical and automated that I know of. But if you have the privileges you can go to Monitor --> Tools --> Manage Users and add an email to each user.

https://docs.thinkboxsoftware.com/products/deadline/10.0/1_User%20Manual/manual/user-management.html?highlight=manage%20users#user-management


#3

i did that but that depends on how the job is submitted i think. I am looking event scripts that everytime something fails it triggers the script and sends an email


#4

I am also trying to see where can I find a reliable Deadline API. for example I want to code an event the basically does

if jobstate == Failed then
find job user
from all the users match this user with his email
pass this email to the Email Address in Manage Users.

I want to do this in coding so it can be expandable. Artists come and go so we dont want to manually add people everytime.

Now the question is, where do you find how to access deadlines Manage Users and then Email Address field. I don’t know how the variable is called or anything and can’t find it.

Any suggestions?

Thanks


#5

Job user you can get from the event OnJobFailedCallback which returns you the job, and you can use that with job.JobUserName to get the user that sent that job to the farm (if available).

Then you’ll just the users info with repositoryutils.GetUserInfos(userNamesAsStringArray, True)

Read more about events from here, or just take a look how premade events are done from the repo.


#6

Thank you very much this helps a lot. Now I am on the right track. Thanks for this