added a function to store trigger information periodically.