...
In the sample below there are two different approaches described how you can start jobs on a file event.
Using a file order source
See also Documentation
the The job chain "job_chain_file_order_source" has a file order source looking watching for files in c:\temp\input ending with the file name extension ".txt". When a file arrives, an order for the job chain will be created. The file will be erased at the end of the job chain by the file sinkssink node(s).
- Orders can not have additional parameters
- Order starts when file arrivesis detected, not when after the file is completly written
<mscgen>
msc {
No Format |
---|
width1. "800";
|
FileSystem,JobScheduler,Order,JobChain;
No Format |
---|
JobScheduler> FileSystem [labelh1. "(1) start file watching"];
FileSystem ... JobChain [label "watching for files "];
|
FileSystemh1. > JobScheduler label "(2) file arrived";
No Format |
---|
JobSchedulerh1. > Order [label "(3) start order processing"];
Orderh1. > JobChain [label "(4) start node"];
JobChainh1. > JobChain [label "(5) start next node(s)"];
JobChainh1. > Order [label "(6) end jobChain"];
Orderh1. > JobScheduler [label "(7) process file sink"];
JobSchedulerh1. > FileSystem [label "(8) delete/move file"];
FileSystem ... JobChain [label = "repeat watching for files "];
|
}
</mscgen>
Using JITL Job JobSchedulerExistsFile
...