Page 1 of 1
Collect Jobs
Posted: Tue Nov 13, 2012 1:30 pm
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.
Collect Jobs
Posted: Tue Nov 13, 2012 2:59 pm
by dkelly
Hello, you could use "Hold Job" to batch the files and then release them to FTP Send.
Collect Jobs
Posted: Tue Nov 13, 2012 3:37 pm
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?
Collect Jobs
Posted: Tue Nov 13, 2012 4:00 pm
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
Collect Jobs
Posted: Tue Nov 13, 2012 4:00 pm
by dkelly
Sorry, I meant to say "Assemble Job". Set it to wait for 30 or 40 jobs.
Collect Jobs
Posted: Wed Nov 14, 2012 2:31 pm
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
.
.
.
.
Collect Jobs
Posted: Wed Nov 14, 2012 3:38 pm
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());
}
}
Collect Jobs
Posted: Wed Nov 14, 2012 4:52 pm
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.