Time-driven (Input Agents)
Introduction: You can find a description of this phase in section Phase 1 (Introduction).
Time-driven Input Agents can actively fetch data from a source at a user-defined time. The times can be specified classically in cron syntax, but also in simplified form. In addition, time-driven Input Agents can be triggered via HTTP or Message.
Notes
The last start time and the next scheduled start time of a profile can be viewed in the Control Center.
Directory names can be dynamically created in all data sources with date placeholders. The directory name C:/tmp/<yyyyMMdd>, for example, will be replaced by C:/tmp/20080601.
The system variable VAR_SYS_TRIGGER_CHANNEL_ID (or MSG_CALL_VAR_SYS_TRIGGER_CHANNEL_ID ) allows you to replace the partner channel of a time-driven Input Agent (any type) by the channel with this ID (value of the variable) (details see there).
General Settings
(1) This setting (Start on IS only) is only relevant for the add-on module Load Balancing to start a profile on a specific node.
Cronjob for Deleting Old Files
It is possible to define a cron job that deletes old files every 10 minutes (no profile required).
Activate the following section in configuration file ./etc/cron.xml.
...
<!-- add a cron job which looks every 10minutes for out-dated files as defined in config file -->
<
Call
name
=
"addJob"
>
<
Arg
>
<
New
class
=
"com.ebd.hub.services.cron.CronJob"
>
<
Arg
>Remove files</
Arg
>
<
Arg
>
<
New
class
=
"com.ebd.hub.services.cron.DeleteFilesCronJob"
>
<
Set
name
=
"configFilename"
>./conf/samples/sample_delete_cron.properties</
Set
>
</
New
>
</
Arg
>
<
Call
name
=
"setTimeSchedule"
>
<
Arg
>
<
New
class
=
"com.ebd.hub.services.cron.Schedule"
>
<
Arg
type
=
"long"
>60000</
Arg
>
</
New
>
</
Arg
>
</
Call
>
</
New
>
</
Arg
>
</
Call
>
...
The path to a properties file, which contains the specific settings for deletion, must be specified in the configFilename parameter.
# sample config for cron job to delete files within named directory
# define the entry folder to look for
directory=/tmp
# do this for sub folders within named directory as well
recursive=true
# define file pattern for selecting files
file.pattern=*.tmp
# files older than 7 days are being removed
retain.days=7