creating custom job

Not listed above software.
Post Reply
User avatar
lulu116
Posts: 13
Joined: Mon Oct 02, 2017 5:26 pm
Location: Paris - France

creating custom job

Post by lulu116 » Tue Oct 10, 2017 11:43 am

hello
I'm trying to create a job for a custom command.
I copied the example from the docs and customize it :
myjob.json :
{
"job":
{
"name" : "Myjob",
"user_name" : "dev",
"host_name" : "s003",
"blocks":[
{
"name" : "mytest",
"tasks_name" : "frames @#@-@#@",
"service" : "generic",
"parser" : "generic",
"frame_first" : 798,
"frame_last" : 1000,
"frames_per_task" : 10,
"frames_inc" : 1,
"command" : "myscript.pl -f @#@ @#@",
"working_directory" : "/work/Projects/Myproject",
"files" : ["/work/Projects/Myproject/output/test.@####@.png"]
}
]
}
}

when I test it :
>afcmd json myjob.json

I have this message :
AFERROR: Invalid job 'Myjob'[0]:
Block 'mytest'[0]: Zero tasks number.

from reading the doc I thought I don't need to specify a task block
I tried to add "numeric" : true, in the block but always the same message.
I used the generic service and generic parser.

what am I doing wrong?
luc
KDE neon User Edition 5.10 - 16.04 - xenial - No windows for me thanks

User avatar
lulu116
Posts: 13
Joined: Mon Oct 02, 2017 5:26 pm
Location: Paris - France

Re: creating custom job

Post by lulu116 » Tue Oct 10, 2017 4:32 pm

I had to add
"flags": 1,
in the blocks section to make it work.
KDE neon User Edition 5.10 - 16.04 - xenial - No windows for me thanks

User avatar
timurhai
Site Admin
Posts: 262
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: creating custom job

Post by timurhai » Sat Oct 14, 2017 8:40 am

Hi.
Better to use Python API:
http://cgru.info/afanasy/api#python
It designed to help to construct a valid job json object and to send it.
Timur Hairulin
CGRU 2.2.3 Ubuntu 14.04LTS (gcc4.8.4)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest