You can create an Ignition Gateway Timer Event Script from the Project > Event Scripts Gateway > Timer menu item in the designer. The timer script will run every hour and it will look something like:from java.util import Date
import system
d = Date()
if system.db.dateFormat(d, "HH") == "00":
results = system.db.runQuery("SELECT * FROM alert_log")
results = system.dataset.toDataSet(results)
spreadsheet = system.dataset.dataSetToExcel(1, [results])
filePath = "C:\\output\\results1.xls"
system.file.writeFile(filePath, spreadsheet)Of course it will save the results on the server machine. If you want that to happen on each client you can make Client Event Scripts.
[quote=“Travis.Cox”]You can create an Ignition Gateway Timer Event Script from the Project > Event Scripts Gateway > Timer menu item in the designer. The timer script will run every hour and it will look something like:from java.util import Date
import system
d = Date()
if system.db.dateFormat(d, "HH") == "00":
results = system.db.runQuery("SELECT * FROM alert_log")
results = system.dataset.toDataSet(results)
spreadsheet = system.dataset.dataSetToExcel(1, [results])
filePath = "C:\\output\\results1.xls"
system.file.writeFile(filePath, spreadsheet)Of course it will save the results on the server machine. If you want that to happen on each client you can make Client Event Scripts.[/quote]
I might be advisable to make the filepath dynamic too.