...
Code Block |
---|
<job order='no' > <params> <param name="[[#file|file]]" value="." /> <param name="[[#file_spec|file_spec]]" value="" /> <param name="[[#gracious|gracious]]" value="false" /> <param name="[[#max_file_age|max_file_age]]" value="0" /> <param name="[[#max#min_file_sizeage|maxmin_file_sizeage]]" value="-10" /> <param name="[[#min#max_file_agesize|minmax_file_agesize]]" value="0-1" /> <param name="[[#min_file_size|min_file_size]]" value="-1" /> <param name="[[#skip_first_files|skip_first_files]]" value="0" /> <param name="[[#skip_last_files|skip_last_files]]" value="0" /> <param name="[[#count_files|count_files]]" value="false" /> <param name="[[#create_order|create_order]]" value="false" /> <param name="[[#create_orders_for_all_files|create_orders_for_all_files]]" value="false" /> <param name="[[#order_jobchain_name|order_jobchain_name]]" value="" /> <param name="[[#next_state|next_state]]" value="" /> <param name="[[#on_empty_result_set|on_empty_result_set]]" value="empty" /> <param name="[[#expected_size_of_result_set|expected_size_of_result_set]]" value="0" /> <param name="[[#raise_error_if_result_set_is|raise_error_if_result_set_is]]" value="0" /> <param name="[[#result_list_file|result_list_file]]" value="empty" /> </params> <script language="java" java_class="sos.scheduler.file.JobSchedulerExistsFile" /> </job> |
...
Panel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
...
Code Block |
---|
[date: date format ]
'''date format''' must be a valid Java data format string, e.g. '''yyyyMMddHHmmss''' , '''yyyy-MM-dd.HHmmss''' etc.
|
ExampleAn example:
Code Block |
---|
<param name="file" value="sample/hello[date:yyyyMMdd].txt" /> |
On 2050-12-31 the parameter file contains the value "sample/hello20501231.txt" .
Supports This parameter supports substitution of job parameter names with their value if the job parameter name is enclosed by % and % .
Example An example: <param name"file" valuh1. "%scheduler_file_path%" />
During the job runtime the parameter file contains the value of the job parameter scheduler_file_path . Using Directory Monitoring with File Orders the job parameter scheduler_file_path contains automatically the path of the file that triggered the order.
Data-Type : SOSOptionString
The default value for this parameter is ..
This parameter is mandatory.
...
For example, the setting "graciousall" will suppress all errors regarding an empty result-set and will terminate a Job (standalone and inside a jobchain) as it would be without errors.
Data-Type : SOSOptionGracious
The default value for this parameter is false.
Parameter <span ih1. "max_file_age">max_file_age<span>: maximum age of
...
a file
...
maximum age of one or multiple filesa file
Specifies the maximum age of one or more filesa file. If a file is older, then it is deemed not to exist.
Possible values:
0 (disabled)
seconds
hours:minutes
hours:minutes:seconds
, it will be not included in the result-list.
Data-Type : SOSOptionTime
The default value for this parameter is 0.
Parameter <span id"
...
min_file_
...
age"
...
>min_file_
...
age<span>:
...
minimum age of a file
...
_minimum age of a file_Specifies the minimum age of a files. If the file(s) is newer _maximum size of one or multiple files_Specifies the maximum size of one or multiple files in bytes: should the size of one of the files exceed this value, then it is classified as non-existing, it will be not included in the result-list.
Possible Values Data-Type :
-1 (disabled)
number (Byte), e.g. 40
numberKB, e.g. 5KB (case insensitive)
numberMB, e.g. 20MB (case insensitive)
numberGB, e.g. 10GB (case insensitive)
Data-Type : SOSOptionFileSize
The default value for this parameter is -1SOSOptionTime
The default value for this parameter is 0.
Parameter <span ih1. "
...
max_file_
...
size"
...
>max_file_
...
size<span>:
...
maximum size of a file
...
_maximum size of a file_Specifies the maximum size of a file in bytes: should the size of one of the files exceed this value, _minimum age of one or multiple files_Specifies the minimum age of one or multiple files. If the file(s) is newer then it is classified as non-existing.
Possible values:
0 (disabled)
seconds
hours:minutes
hours:minutes:seconds
Data-Type : SOSOptionTime
The default value for this parameter is 0.
Parameter <span id"min_file_size">min_file_size<span>: minimum size of one or multiple files
valid values for file size are
Value | Description |
---|---|
-1 | The value of the parameter has no effect and the parameter is not part of the filter. |
number | a number stand for the size in byte, e.g. 40 means 40 bytes. |
numberKB | a number with the chars "KB" stand for the size in kilobyte. |
numberMB | a number with the chars "MB" stand for the size in megabyte. |
numberGB | a number with the chars "GB" stand for the size in gigabyte. |
minimum size of one or multiple files
Specifies the minimum size of one or multiple files in bytes: should the size of one of the files fall below this value, then it is not included in the result list of the operation.valid values for file size
Possible Values:
-1 (disabled)
number (Byte), e.g. 40
numberKB, e.g. 5KB (case insensitive)
numberMB, e.g. 20MB (case insensitive)
numberGB, e.g. 10GB (case insensitive)
Data-Type : SOSOptionFileSize
The default value for this parameter is -1.
Parameter <span
...
id"
...
min_
...
file_
...
size"
...
>min_
...
file_
...
size<span>:
...
minimum size of
...
one or multiple files
...
minimum size of one or multiple files
Specifies the minimum size of one or multiple files in bytes: should the size of one of the files fall below this value, then it is not included in the result list of the operation.
valid values for file size are
Value | Description |
---|---|
-1 | The value of the parameter has no effect and the parameter is not part of the filter. |
number | a number stand for the size in byte, e.g. 40 means 40 bytes. |
numberKB | a number with the chars "KB" stand for the size in kilobyte. |
numberMB | a number with the chars "MB" stand for the size in megabyte. |
numberGB | a number with the chars "GB" stand for the size in gigabyte. |
Data-Type : SOSOptionFileSize
number of files to remove from the top of the result-set
The number of files are removed from the beginning of the set resulting by min_file_size , min_file_age etc. These files are excluded from further operations.
The result set is sorted according to the used filter parameters:
- min_file_age , max_file_age : in ascending order by date of last modification, the newest file first.
- min_file_size , max_file_size : in ascending order by file size, the smallest file on top.
- if parameters for file age as well as file size are given the set is sorted by file age.
Only either skip_first_files or skip_last_files is allowed to be set at one time.
Data-Type : SOSOptionInteger
The default value for this parameter is 0 -1.
Parameter <span
...
ih1. "skip_
...
first_files">skip_
...
first_files<span>: number of files to remove from the
...
top of the result-set
...
_number of files to remove from the bottom top of the result-set_
The number of files are removed from the end beginning of the set resulting by min_file_size , min_file_age etc. These files are excluded from further operations.
The result set is sorted according to the used constraining filter parameters: +
- min_file_age , max_file_age : in ascending order by date of last modification, the newest file first.
...
- min_file_size , max_file_size : in ascending order by file size, the smallest file
...
- on top.
...
- if parameters for file age as well as file size are given the result set is sorted by file age.
Only either skip_first_files or skip_last_files is allowed to be set at one the same time.
Data-Type : SOSOptionInteger
The default value for this parameter is 0.
Parameter <span
...
id"skip_last_files"
...
>skip_last_files<span>:
...
number of files to remove from the bottom of the result-set
...
_number of files to remove from the bottom of the result-set_The number of files are removed from the end of the set resulting by min_file_size, min_file_age etc. These files are excluded from further operations.
The result set is sorted according to the used constraining parameters:
+ min_file_age, max_file_age: in ascending order by date of last modification, the newest file first.
+ min_file_size, max_file_size: in ascending order by file size, the smallest file first.
+ if parameters for file age as well as file size are given the set is sorted by file age.
Only either skip_first_files or skip_last_files is allowed to be set at one timeReturn the size of resultset
If this parameter is set true " true " the number of matches is returned in the order parameter " scheduler_SOSFileOperations_file_count ".
Valid values: true, 1, on, yes, y, ja, j and false, 0, off, no, n, nein
This parameter is valid and available for order driven jobs only. JobChains, for example, are order driven jobs. In standalone jobs this parameter will be ignored without further notice.
Data-Type : SOSOptionBooleanSOSOptionInteger
The default value for this parameter is false 0.
Parameter <span
...
ih1. "
...
count_
...
files"
...
>count_
...
files<span>: Return the size of resultset
...
Return the size of resultset
If this parameter is set true " true " the number of matches is returned in the order parameter " scheduler_SOSFileOperations_file_count ".
Activate file-order creation
With this parameter it is possible to specify, that for all filenames in the resultlist or for the first file only (see create_orders_for_all_files ) a file-order has to be created and launched.
Valid values: true, 1, on, yes, y, ja, j and false, 0, off, no, n, nein, off, no, n, nein
This parameter is valid and available for order driven jobs only. JobChains, for example, are order driven jobs. In standalone jobs this parameter will be ignored without further notice.
Data-Type : SOSOptionBoolean
The default value for this parameter is false.
Parameter <span id"create_order">create_order<span>: Activate file-order creation
...
Activate file-order creation
With this parameter it is possible to specify, that for all filenames in the resultlist or for the first file only (see create_orders_for_all_files ) a file-order has to be created and launched.
Valid values: true, 1, on, yes, y, ja, j and false, 0, off, no, n, nein
Data-Type : SOSOptionBoolean
The default value for this parameter is false.
Use together with parameter:
create_orders_for_all_files - Create a file-order for every file in the result-listorder_jobchain_name - next_state -
Parameter <span ih1. "create_orders_for_all_files">create_orders_for_all_files<span>: Create a file-order for every file in the result-list
...
Create a file-order for every file in the result-list
Valid values: true, 1, on, yes, y, ja, j and false, 0, off, no, n, nein
Data-Type : SOSOptionBoolean
The default value for this parameter is false.
Use together with parameter:
create_order - Activate file-order creationorder_jobchain_name - next_state -
Parameter <span id"order_jobchain_name">order_jobchain_name<span>: The name of the jobchain which belongs to the order
...
The name of the jobchain which belongs to the order
The name of the jobchain which has to be launched by the order is the value of this parameter.
One must take into account, that the name of the jobchain must contain a subfolder structure if the jobchain is not in the folder "live". An example: the jobchain "Test" is located in "live/sample/FileOperations/". The value which has to be specfied is then "/sample/FileOperations/Test".
Data-Type : SOSOptionString
Data-Type : SOSOptionBoolean
The default value for this parameter is false.
Use together with parameter:
create_orders_for_all_files - Create a order - Activate file-order for every file in the result-listorder_jobchain_name - creationnext_state -
Parameter <span ih1. "
...
next_state">next_state<span>: The first node to execute in a jobchain
...
The first node to execute in a jobchain
The name of the node of a jobchain, with which the execution of the chain must be started, is the value of this parameter.
Data-Type : SOSOptionJobChainNodeCreate a file-order for every file in the result-list
Valid values: true, 1, on, yes, y, ja, j and false, 0, off, no, n, nein
Data-Type : SOSOptionBoolean
The default value for this parameter is false.
Use together with parameter:
create_order - Activate file-order creationorder_jobchain_name - next_state -
Parameter <span id"
...
on_empty_
...
result_
...
set"
...
>on_empty_
...
result_
...
set<span>: Set next node on empty result set
...
Set next node on empty result set
The next Node (Step, Job) to execute in a JobChain can be set with this parameter. The value of the parameter is a (valid) node-name of the current JobChain. In case of an empty result-set, e.g. due to non existent files, the current job will end without an errors and the JobChain will continue with the name of the node which is given as the value of this parameterThe name of the jobchain which belongs to the order
The name of the jobchain which has to be launched by the order is the value of this parameter.
One must take into account, that the name of the jobchain must contain a subfolder structure if the jobchain is not in the folder "live". An example: the jobchain "Test" is located in "live/sample/FileOperations/". The value which has to be specfied is then "/sample/FileOperations/Test".
Data-Type : SOSOptionString
Use together with parameter:
create_order - Activate file-order creationnext_state - SOSOptionJobChainNode
The default value for this parameter is empty.
Parameter <span ih1. "
...
expected_size_of_result_set">expected_size_of_result_set<span>: number of expected hits in result-list
...
number of expected hits in result-list
Data-Type : SOSOptionInteger
The default value for this parameter is 0.
The first node to execute in a jobchain
The name of the node of a jobchain, with which the execution of the chain must be started, is the value of this parameter.
Data-Type : SOSOptionJobChainNode
Use together with parameter:
create_order - Activate file-order creationorder_jobchain_name - raise_error_if_result_set_is - raise error on expected size of result-set
Parameter <span id"
...
raise_error_
...
if_result_set_is"
...
>raise_error_
...
if_result_set_
...
is<span>: raise error on expected size of result-set
...
raise error on expected size of result-set
With this parameter it is possible to raise an error if the quantity of hits of the result-list is according to Set next node on empty result set
The next Node (Step, Job) to execute in a JobChain can be set with this parameter. The value of the parameter is a (valid) node-name of the current JobChain. In case of an empty result-set, e.g. due to non existent files, the current job will end without an errors and the JobChain will continue with the name of the node which is given as the value of this parameter.
Data-Type An example: SOSOptionJobChainNode
The default value for this parameter is empty.
...
Assuming, that the parameter "raise_error_if_result_set
...
_ih1. ne" is defined and the parameter "expected_size_of_result_
...
number of expected hits in result-list set1" is specified as well. If the number of hits is not equal to "1" an error will raised.
Data-Type : SOSOptionIntegerSOSOptionRelOp
The default value for this parameter is 0.
Use together with parameter:
raiseexpected_errorsize_ifof_result_set_is - raise error on expected size of result-set - number of expected hits in result-list
Parameter <span
...
ih1. "result_
...
list_
...
file"
...
>result_
...
list_file<span>: Name of the result-list file
...
Name of the result-list file
If the value of this parameter specifies a valid filename the result-list will be written to this file.
Data-Type : SOSOptionFileName
The default value for this parameter is empty.
Return parameter JobSchedulerExistsFile
The order parameter described below are returned by the job to the JobScheduler. JobSchedulerExistsFile
Panel | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||
|
Parameter <span id"scheduler_file_path">scheduler_file_path<span>:
raise error on expected size of result-set
With this parameter it is possible to raise an error if the quantity of hits of the result-list is according to the value of this parameter.
An example:
Assuming, that the parameter "raise_error_if_result_set_ih1. ne" is defined and the parameter "expected_size_of_result_set1" is specified as well. If the number of hits is not equal to "1" an error will raised.
Data-Type : SOSOptionRelOp
The default value for this parameter is 0.
Use together with parameter:
expected_size_of_result_set - number of expected hits in result-list
Parameter <span ih1. "result_list_file">result_list_file<span>: Name of the result-list file
Name of the result-list file
If the value of this parameter specifies a valid filename the result-list will be written to this file.
Data-Type : SOSOptionFileName
The default value for this parameter is empty.
Return parameter JobSchedulerExistsFile
The order parameter described below are returned by the job to the JobScheduler. JobSchedulerExistsFile
...
...
Name
...
title
...
mandatory
...
default
...
...
file to process for a file-order
...
false
...
empty
...
...
file to process for a file-order
...
false
...
empty
...
...
file to process for a file-order
...
false
...
empty
...
scheduler_sosfileoperations_resultset
...
The result of the operation as a list of items
...
false
...
empty
...
scheduler_sosfileoperations_resultsetsize
...
The amount of hits in the result set of the operation
...
false
...
empty
...
scheduler_sosfileoperations_file_count
...
Return the size of the result set after a file operation
...
false
...
0
...
Using Directory Monitoring with File Orders the job parameter scheduler_file_path contains automatically the path of the file that triggered the order.
Data-Type : SOSOptionFileName
The default value for this parameter is empty.
Parameter <span ih1. "scheduler_file_
...
parent">scheduler_file_
...
parent<span>: pathanme of the file to process for a file-order
...
pathanme of the file to process for a file-order
Data-Type : SOSOptionFileName
The default value for this parameter is empty.
Parameter <span
...
id"scheduler_file_
...
name">scheduler_file_
...
name<span>:
...
Name of the file to process for a file-order
...
pathanme Name of the file to process for a file-order
Data-Type : SOSOptionFileName
The default value for this parameter is empty.
Parameter <span
...
ih1. "scheduler_
...
sosfileoperations_
...
resultset">scheduler_
...
sosfileoperations_
...
resultset<span>:
...
The result of the
...
operation as a list of items
...
The result of the operation as a list of items Name of the file to process for a file-order
Data-Type : SOSOptionFileNameSOSOptionstring
The default value for this parameter is empty.
Use together with parameter:
scheduler_sosfileoperations_Resultsetsize - scheduler_sosfileoperations_file_count -
Parameter <span
...
id"scheduler_sosfileoperations_
...
resultsetsize">scheduler_sosfileoperations_
...
resultsetsize<span>: The amount of hits in the result set of the operation
...
...
The amount of hits in the result set of the operation as a list of items
Data-Type : SOSOptionstringSOSOptionsInteger
The default value for this parameter is empty.
Use together with parameter:
scheduler_sosfileoperations_ResultsetsizeResultSet - scheduler_sosfileoperations_file_countFileCount -
Parameter <span
...
ih1. "scheduler_sosfileoperations_
...
file_count">scheduler_sosfileoperations_file_
...
count<span>: Return the size of the result set
...
after a file operation
...
The amount of hits in Return the size of the result set of the after a file operation
Data-Type : SOSOptionsIntegerSOSOptionInteger
The default value for this parameter is empty 0.
Use together with parameter:
scheduler_sosfileoperations_ResultSetResultsetsize - scheduler_sosfileoperations_FileCountResultSet -
Parameter <span id
...
"scheduler_sosfileoperations_file_count">scheduler_sosfileoperations_file_count<span>: Return the size of the result set after a file operation
...
Return the size of the result set after a file operation
...