Cannot access Task Time via Script

Hi there,

I’m trying to access Task Time, progress value and slave group via script.

I managed to get different Properties like this:

[code] for job in RepositoryUtils.GetJobs(True):

    # Ignore Completed Jobs
    if job.JobStatus != "Completed":
        job = RepositoryUtils.GetJob(jobId, True)
        tasks = RepositoryUtils.GetJobTasks(job, True)

        for theTask in tasks:
            myTaskID = theTask.TaskId
            myRenderStatus = theTask.TaskStatus
            RenderStatusMessage = theTask.TaskRenderStatus[/code]

What i would like to get is the “Task Time” like you can see it in the monitor in the Tasks Panel Column.

Also, a progress value and the rendering slave’s Group similar to the slave name: theTask.TaskSlaveMachineName
Right now i’m getting the progress value with a regex from:RenderStatusMessage = theTask.TaskRenderStatus #0: Frame 499 - Rendering image... [00:08:26.0] [00:36:06.6 est] - 23.4% regex = r"(\d+[.]\d[%])" percentage = (re.findall(regex, RenderStatusMessage))[0]

Is there a way to do this?

Hi Heilandzack,

Take a look at the JobTaskTimes example on GitHub, and let us know if you have more questions.

Thank you!

This already helps alot!
I’ll dig in…

I keep forgetting about the GitHub examples. Thanks again!

Hey, i made it work with the script.

However there’s one problem, propably due to a deadline Version change.

On GitHub: “TaskRenderTime” should be replaced with “TaskTime” or “RenderTime”

That made it work…
Thanks again!