File orders can be used when a job chain is to process files from a directory. A file order is an order containing a reference to a file. The JobScheduler monitors a directory and creates a new file order for each new file in the directory.
<job_chain name="my_job_chain"> <file_order_source directory="path"/> <file_order_source directory="other_path" regex="regex"/> <job_chain_node state="100" job="job_1 error_state="error"/> <job_chain_node state="200" job="job_2 error_state="error"/> <file_order_sink state="ok" remove="yes"/> <file_order_sink state="error" move_to="/errorpath.../ "/> </job_chain>
See
A file order source
<job_chain …> <file_order_source directory="…" regex="…"/> …
A file order is an
.
The oldest file (defined as that with the oldest last change date) is handled first.
A job chain can have a number of order sources. The JobScheduler handles all orders in chronological order as described above.
The JobScheduler removes a file order when the corresponding file is no longer in the monitored directory and:
the file order has not been handed over to a job
the file order is blacklisted
File orders being executed are not affected.
This check is carried out when:,
After an order has been completed, the corresponding file can either be moved or removed.
States defined
Should, however, the file already have been removed, the JobScheduler issues a warning and the file order is completed.
Should it not be possible to either move or remove the file, then it is added to the blacklist.
<file_order_sink state="…" move_to="directory_path">
A file in the target directory having the same name will be overwritten without warning.
<file_order_sink state="…" remove="yes">
Should the file still exist after a file order has been completed (and reached an end state), then the JobScheduler sets the order on the blacklist.
It remains there until:
This stops the file immediately creating a new file order.
Should an error occur when a directory is being monitored -
for example, because the directory has been uncoupled -
then the JobScheduler gives out a warning and sends an e-mail
according to the settings in
The JobScheduler regularly attempts to restart the monitoring.
In doing so it ignores error messages.
The intervals in which it does this is set using
Should it not be possible to create the corresponding file name for an order -
(because the path is too long for the
As soon as the first job to create an order is ready to be carried out for the first time, the JobScheduler will read the relevant directory (within any constraints set using regular expressions) and creates the file orders
Should the directory contain more files than allowed by
The JobScheduler re-reads a directory when:
The JobScheduler is able use the operating system to monitor directories on Windows systems. A signal causes the JobScheduler to read the directory before the end of the period. This means that the JobScheduler can immediately react to a new file.
This does not mean that monitoring of a directory on another computer can be switched off
using the setting
The JobScheduler API (Application Programme Interface) is a way of allowing program code to control the JobScheduler. XML jobs, or jobs which cause an executable file to be started are examples of non-API jobs - i.e. jobs which do not use the API.
The file path is contained in the