Collect Jobs

Post Reply
w.schaf
Newbie
Posts: 4
Joined: Tue Nov 13, 2012 1:24 pm

Collect Jobs

Post by w.schaf »

Hi,



i want to send PDFs to a ftp-server, this works great. But i want to collect 30 or 40 pdfs until the transfers should start. Is this possible without scripting?



Thanks for your help.
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Collect Jobs

Post by dkelly »

Hello, you could use "Hold Job" to batch the files and then release them to FTP Send.
w.schaf
Newbie
Posts: 4
Joined: Tue Nov 13, 2012 1:24 pm

Collect Jobs

Post by w.schaf »

I know that i can stop it manually with that option. But i need that automatet by the flow.



I mean...start sending when more than 30 Jobs/Files there, like that little script-code:



if(fileliste.length > 30)

{

sendFTP...

}

else

{

wait until filelist.length >30

}



or is there a other function to do that?
tkittel
Member
Posts: 50
Joined: Thu Jul 21, 2011 7:30 am

Collect Jobs

Post by tkittel »

Hello w.schaf,



I think you missunderstood "dkelly": You don't have to use the "stop flow" button manually, but the "hold job" element. In the outgoing connection of the "hold element" there's a property "folder constraint". Shouldn't the "Maximum file count" property will solve your problem?



There's also a little video of enfocus:

http://www.youtube.com/watch?v=mqyNKM_Ogc4

(can't find the original link at the moment)



Hope this helps,

Thomas
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Collect Jobs

Post by dkelly »

Sorry, I meant to say "Assemble Job". Set it to wait for 30 or 40 jobs.
w.schaf
Newbie
Posts: 4
Joined: Tue Nov 13, 2012 1:24 pm

Collect Jobs

Post by w.schaf »

Thanks for the help, but that is not what i searching for.

Sorry, for my bad description.

The flow should start the transfer to the ftp when there more than 30 jobs in the queue.



Example ->

1. File -> not sent

2. File -> not sent

3. File -> not sent

.

.

.

30 File -> Send all collected files from 1-30

31 File -> Send file

32 File -> Send file

.

.

.

.
w.schaf
Newbie
Posts: 4
Joined: Tue Nov 13, 2012 1:24 pm

Collect Jobs

Post by w.schaf »

After a lot of searching i think there is no solution without scripting.

This is what i heave now:

D:TestParkplatz

function jobArrived( s : Switch, job : Job )

{

var parkingLot = "D:TestParkplatz";

var Pagecount = s.getPropertyValue("Startpunkt"); //30

var objParkplatz = new Dir(parkingLot);

var pdfFiles = objParkplatz.entryList( "*", Dir.Files, Dir.Name);



s.sleep(5);

var inJOB = s.getJobs();



if(pdfFiles.length >= Pagecount && inJOB.length == 1)

{

job.log(-1, "Send all files form the parkingLot. Count: "+ pdfFiles.length );



/* AND HOW CAN I CONTINUE ALL THE OTHER JOBS???? */



}

else

{

job.log(-1, "Ignor/delete Job!");

job.sendToNull(job.getPath());

}

}

freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Collect Jobs

Post by freddyp »

I am sorry, but I fail to see what is wrong with Dwight's suggestion to use "Assemble job". Looking at the script it does not do anything else than what the "Every N jobs" property of the "Assemble job" element will do.
Post Reply