farming custom scripts

General discussions and questions.
Post Reply
User avatar
lulu116
Posts: 16
Joined: Mon Oct 02, 2017 5:26 pm
Location: Paris - France

farming custom scripts

Post by lulu116 »

hello
I have some custom scripts that generates images.
"myscript -f 100 110" would generate "image.{0100,0110}.png" for example...
I'm trying to find how I could submit that kind of custom commands to afanasy.
so far I understand you have to create a .json description of the job but I'm not sure how I have to handle "service" and "parser" for that kind of thing.

if someone could give me some hints or examples how to do that it would be great.
luc
KDE neon User Edition - 18.04 - bionic - No windows for me thanks
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: farming custom scripts

Post by timurhai »

Hi.
Better to use Python API:
http://cgru.info/afanasy/api#python

It should be very simple:

Code: Select all

j=af.Job('job_name')
b=af.Block('block_name')
b.setCommand('myscript -f @###@ @###@')
b.setNumeric( 100, 110, 1, 1)
j.blocks.append(b)
j.send()
- but i did not check this code
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
lulu116
Posts: 16
Joined: Mon Oct 02, 2017 5:26 pm
Location: Paris - France

Re: farming custom scripts

Post by lulu116 »

thank you.it's working fine.luc
KDE neon User Edition - 18.04 - bionic - No windows for me thanks
Post Reply