[Closed] Testing if job name exist before submitting
Hi guys!
I’m still trying to learn maxscript but I bump into some problems from time to time…
Now I’m submitting jobs to backburner with maxscript, everything is working great but I would like to know what is the best method to test if a there is a job with the same name on the list. Sometimes I want to resend a job with some correction and all I could get is a message box warning me with this code:
m = netrender.getmanager()
m.connect #automatic "255.255.255.0"
job = m.newjob()
job.name = test
jobs = m.getJobs()
for i=1 to jobs.count while jobs[i].name == "test" do messagebox "Job name already exist"
job.submit()
What would be the right sintax to wait to test all the jobs name before I submit the job? I did a lot of search, the jobs.name sintax I found in and old topic, but I couldn’t find this specific question.
Thanks in advance!
Flavio
If you are running both 64bit and 32bit jobs you will actually have to connect to the manager using the optional platform parameter. Otherwise you will only get the jobs for the platform (#32 or #64) and cause the job submission to fail if the job name exists in the other platform.
-Eric
There’s just one manager and everything is 64-bit, thanks for the help Eric.
Got any idea how should I test if the job already exist befor submitting?