I need an example of where, how and what sytax to use for sending my alert log to an excel file ever 24 hours at mid night.
I can make it create and send to excel by clicking a button with the code below in the event handler but I need it to be automatic at mid night.
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)
I’m new to Ignition and Java language. Please help!