Offline, backfill mode
- Last UpdatedApr 30, 2024
- 2 minute read
If you want to run a sequence over a range of timestamps, you can configure a named timestamp in the sequences settings (sequence_settings.json file). For timestamp ranges, you must specify a starting timestamp, an ending timestamp, and the time interval, as shown in the following JSON example code:
"timestamps": {
"MyRange" : {
"start": "1/1/2021 12:00:00",
"end": "1/31/2021 23:00:00",
"interval": "1:00"
}
}
The preceding code example creates a named timestamp called MyRange.
When you run a sequence over a range of timestamps, it runs in the background. To do this, you use the start-backfill command instead of the run command, as shown in the following example:
rts start-backfill basicsample MyRange
This runs the sequence script repeatedly with a different timestamp from the range for each run. For the MyRange example, the sequence script runs for the entire month of January 2021 at a one-hour interval.
You can also specify a list of timestamps instead of a range. To do this, you must create a .csv file of the timestamps and configure a named timestamp in the sequences settings (sequence_settings.json file).
For timestamp lists, you must specify a file relative to the sequence folder, as shown in the following JSON example code. JSON syntax requires you to use two backslashes for each backslash in the file path.
"timestamps": {
"MyFile" : {
"timestamps_file": ".\\timestamps.csv"
}
}
You can then use the run command to invoke the sequence for each timestamp in the list, as shown in the following example code:
rts run basicsample MyFile
You can invoke only one backfill at a time.
In this mode, you won't see the output of the sequence in the console window since the sequence is running in the background. You'll need to monitor the sequence-specific log file for progress. See Monitor a log file for more information. You can use the rts list command to check if the command is done.
You can use the stop-backfill command to stop the sequence that you started with the start-backfill command.
When you run a sequence in a backfill run, AVEVA Real-Time System (RTS) keeps a record of which timestamps have already been processed. If you stop a backfill run and the restart it, RTS starts at the last processed timestamp rather than starting from the beginning of the range.
Background runs are resilient across system restarts if RTS is configured as a service.