set_min_age

Specifies the minimum time in seconds to wait after the file was modified before ingesting the file.

Member of namespace

mvscan

Syntax

bool set_min_age (int nSecs)

Parameters

nSecs
The number of seconds since a file or group of files was last modified before the scan action ingests the file or files. As shown in the following table, the specific meaning of this parameter depends on the way that the scan action checks the minimum age of files:
Checking type Parameter meaning When
Individual The number of seconds since a file was modified before the scan action ingests the file. Non-tree mode or when the wait time is zero as set by the set_wait_time action
Collective The number of seconds since any file was modified within a particular folder before the scan action ingests any file from that folder. Tree mode except when the wait time is zero as set by the set_wait_time action

You set tree mode by calling set_tree_mode. For more information, see set_tree_mode. For information about setting the wait time, see set_wait_time.

By default, if you do not call this action, the default number of seconds that the scan action waits is zero. In this case, files are ingested as soon as they are present.

Returns

Always True.

Level

Batch level.

Details

This setting can be used to prevent premature ingestion of a file which may be incomplete. For example, a network scanner or multifunction device might create the image file and write contents over a period of time, rather than all at once. In that case ingesting the file immediately could cause errors, whereas waiting for 5 or 10 seconds would provide sufficient time for the file to be completed. If required, the appropriate value must be determined experimentally.

For this action to take effect, it must be called before the Scan action.

Example:
set_types("tif")
set_min_age("10")
scan()