Trigger Service Parameters
Scripts using the Interactive ARDI trigger option can take command-line parameters to control what they do.
Parameters
From Date (FRM)
The starting date for back-filling. This runs all of your triggers over the data from history.
Note that if no to date is provided, the system will fill from the from date to the current date and time.
This is expected to be in a YYYY-MM-DD hh:mm:ss format.
To Date (TO)
The ending date for back-filling. This option has no effect unless a starting date has been given.
Output (output)
The JSON file containing the output settings for the Modular Output System.
Last (last)
A file where the last event date is stored. If this file exists, the trigger system will automatically backfill any data between that date and the current date when the application is started.
A second file, with the additional extension “.loss”, may be created if unexpected events occur during the lifetime of the application - for example, if the process is paused or the computer sent to sleep. This file contains time-frames that should be backfilled when the application is next restarted.
This option is used when running your trigger as a service, when you wish to record event data to a database, log or other storage system without gaps or interruptions.
Examples
myscript.py
Starts monitoring live events
myscript.py --frm "2023-10-02 02:00:00"
Runs the triggers over the time between 2AM on the 2/10/2023 and the current time
myscript.py --last "lastrecording.txt"
Automatically backfills any missing data before resuming live trigger detection