creating custom job

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

creating custom job

Post by lulu116 »

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 - 18.04 - bionic - No windows for me thanks
User avatar
lulu116
Posts: 16
Joined: Mon Oct 02, 2017 5:26 pm
Location: Paris - France

Re: creating custom job

Post by lulu116 »

I had to add
"flags": 1,
in the blocks section to make it work.
KDE neon User Edition - 18.04 - bionic - No windows for me thanks
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: creating custom job

Post by timurhai »

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 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply