Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Checks for the existence of a file, a directory or for specific files inside of a directory.

Job Example:

Code Blocknoformat
  <job ordeh1. order='no' >
     <params>
       <param name="file" valuh1. value="." />
       <param name="file_spec" value=valuh1. "" />
       <param name="gracious" value=valuh1. "false" />
       <param name="max_file_age" value=valuh1. "0" />
       <param name="max_file_size" value=valuh1. "-1" />
       <param name="min_file_age" value=valuh1. "0" />
       <param name="min_file_size" valuh1. value="-1" />
       <param name="skip_first_files" value=valuh1. "0" />
       <param name="skip_last_files" valuh1. value="0" />
     </params>
     <script language="java" java_class=clash1. "sos.scheduler.file.JobSchedulerExistsFile" />
  </job>
 

Parameter used by JobSchedulerExistsFile

Panel
titlh1. title caption of tabletitlh1.
title caption of table
1borderStyledashedborderStylh1. dashed
2borderColoh1. #cccborderColor#ccc
3bgColor#fffbgColoh1. #fff

Name

title

mandatory

default

file

File or Folder to watch for

true

.

file_spec

Regular Expression for filename filtering

false

 

gracious

Enables or disables error messages

false

false

max_file_age

maximum age of one or multiple files

false

0

max_file_size

maximum size of one or multiple files

false

-1

min_file_age

minimum age of one or multiple files

false

0

min_file_size

minimum size of one or multiple files

false

-1

skip_first_files

number of files to remove from the beginning of the result-set

false

0

skip_last_files

number of files to remove from the bottom of the result-set

false

0

Parameter: <span

...

id"file">file<span> File or Folder to watch for

...

File or Folder to watch for

Checked file or directory

Supports masks for substitution in the file name and directory name with format strings that are enclosed by {*} and {*} . The following format strings are supported:

Code Blocknoformat
 [date: date format ]  '''{*}date format'''{*} must be a valid Java data format string, e.g. '''yyyyMMddHHmmss'''{*}yyyyMMddHHmmss{*} , '''{*}yyyy-MM-dd.HHmmss'''{*} etc. 
 

Example:

Code Blocknoformat
 <param name=namh1. "file" value="sample/hello[date:yyyyMMdd].txt" />  
 

On 2050-12-31 the parameter file contains the value "sample/hello20501231.txt" .

Supports substitution of job parameter names with their value if the job parameter name is enclosed by %  and  % .

Example: <param namenamh1. "file" valuh1. value"%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.

The default value for this parameter is ..

This parameter is mandatory.

Parameter: <span

...

ih1. "file_spec">file_spec<span> Regular Expression for filename filtering

...

Regular Expression for filename filtering

Regular Expression for file filtering. The behaviour is CASE_INSENSITIVE.

Only effective if the parameter file is a directory.

Parameter: <span

...

id"gracious">gracious<span> Enables or disables error messages

...

Enables or disables error messages

Enables or disables error messages that are caused by a nonexistent file or directory being specified with the parameters file and respectively file_spec .

...

The default value for this parameter is false.

Parameter: <span

...

ih1. "max_file_age">max_file_age<span> maximum age of one or multiple files

...

maximum age of one or multiple files

Specifies the maximum age of one or more files. If a file is older, then it is deemed not to exist.

Possible values:

0 (disabled)

seconds

hours:minutes

hours:minutes:seconds

The default value for this parameter is 0.

Parameter: <span

...

id"max_file_size">max_file_size<span> maximum size of one or multiple files

...

maximum size of one or multiple filesSpecifies 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.

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)

The default value for this parameter is -1.

Parameter: <span

...

ih1. "min_file_age">min_file_age<span> minimum age of one or multiple files

...

minimum age of one or multiple filesSpecifies 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

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

...

minimum size of one or multiple filesSpecifies 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 classified as non-existing.

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)

The default value for this parameter is -1.

Parameter: <span

...

ih1. "skip_first_files">skip_first_files<span> number of files to remove from the beginning of the result-set

...

number of files to remove from the beginning of the result-setThe 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 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.

...

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-setThe 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.

...