Requirements when polling for files

When you set up an action to run by polling for files, the action will potentially be run according to the period you've configured. However, it will only actually run if one of these conditions are true:

  • A PUT, PUT+GET, or LCOPY command within the action has a file to send or copy.
  • The CHECK command is present in the action and specific conditions for that command are met. 

Note that if an action contains both PUT/LCOPY and CHECK commands, it is the first command encountered that determines whether autosend properties (for PUT and LCOPY) or autocheck properties (for CHECK) are used. Since this could make it difficult to determine the actual schedule, actions designated for autocheck should contain only the CHECK command.

The frequency at which the scheduler checks to see if there are files to send or copy is controlled by the Autosend Check Every property. This indicates that even schedules set up for continuous polling are not actually continuous. Rather, their minimum frequency of polling is determined by Autosend Check Every.

PUT, PUT+GET, and LCOPY command rules

The following rules apply to actions containing PUT, PUT+GET, or LCOPY commands scheduled by polling for files.
  • For an action to be scheduled this way, at least one of its PUT, PUT+GET, or LCOPY commands must use the delete after transfer (-DEL) option.
  • If an action contains both PUT (or PUT+GET) and LCOPY commands, whichever type is found first in the action drives its scheduling. Even though this is allowed, it is highly recommended that autosend actions contain only one autosend-type command (for example, PUT/LCOPY -DEL). This ensures all autosends process only stable files. Furthermore, if multiple scheduler threads are in use, separating autosend commands should increase the throughput of the scheduler loop.
  • When autosend is activated, files are checked for stability before they are sent or copied. This is an important feature to prevent to an unstable or incomplete file from being sent or copied. For this reason, all PUT and LCOPY commands should use autosend.

CHECK command rules

Note: The CHECK command is available only in the Cleo Harmony and Cleo VLTrader applications.
The following rules apply to actions containing CHECK commands scheduled by polling for files.
  • The CHECK command must have a CHECK -FIL or CHECK -DIR command in the action.
  • The CHECK command must specify an Age value of >nn[D|H|M|S] (where nn is a value of 0-99).
  • The CHECK command may not specify the Count parameter.  Therefore, by default, the count will be only one (1).
  • If a file is reported on a particular CHECK run, and it is not subsequently handled (for example, moved somewhere else or processed in some way), it will be reported again on future executions of the command. For this reason, it is recommended that the Execute On Check Conditions Met property is specified, and that it contains the proper system commands needed to clean up the file.
  • For details of the CHECK command, see CHECK command.
  • The frequency of autochecks is based on the setting of the Age parameter and the age of the files found. It is easiest to understand this by example:
    Example 1 -- Age is >1D
    Given the command CHECK -FIL * Age=>1D
    and given the initial files and their ages:
    • File1 (0.9D)
    • File2 (0.9D)
    • File3 (0.7D)
    • File4 (0.7D)
    Since no files are currently older than one day, the first check would be run in 0.1 days, when File1 and File2 become one day old. After that, the next check is run 0.2 days later, when File3 and File4 become one day old. After that, if there are no additional files present, the next check will be run one day later (based on the 1D value set for the Age).
    Note:

    When the first check is run, File1 and File2 are reported. Their file paths are available to any %file% macro present within the Execute On Check Conditions Met property. When the command is run again, if the same files are present, they are counted and reported again. Therefore, if you do not want to be notified multiple times regarding the same file, it is imperative that the files are dealt with (that is, removed) in the Execute On Check Conditions Met command.

    Example 2 -- Age is >0D
    Given the command: CHECK -FIL * Age=>0D
    and given the initial files and their ages:
    • File1 (0.9D)
    • File2 (0.9D)
    • File3 (0.7D)
    • File4 (0.7D)

    Since there are four files with an age greater than zero days (that is, they simply exist), the initial check reports all files. After that, subsequent checks will take place at a frequency determined by the Autosend Check Every property.

Note: The option to only run Action if files are found to send or check is not available for JavaScript actions.