|
@@ -73,18 +73,13 @@ def Low_Soc_Alarm():
|
|
|
low_soc_bat_list=Low_soc_alarm.low_soc_alarm(param,df_bms,low_soc_bat_list,sn,df_OprtnSta)
|
|
|
|
|
|
|
|
|
- return low_soc_bat_list
|
|
|
+ return low_soc_bat_list
|
|
|
mylog=log.Mylog('log_diag.txt','error')
|
|
|
mylog.logcfg()
|
|
|
-scheduler = BlockingScheduler()
|
|
|
-low_soc_bat_list=Low_Soc_Alarm()
|
|
|
-low_soc_bat_list.to_excel('Low_Soc_Alarm.xlsx')
|
|
|
-#------------------------------------定时执行程序-----------------------------------------------------------
|
|
|
-scheduler.add_job(Low_Soc_Alarm, 'interval',days=1, start_date='2021-11-12 00:00:00', id='low_soc_alarm')
|
|
|
+
|
|
|
|
|
|
try:
|
|
|
- scheduler.start()
|
|
|
+ low_soc_bat_list=Low_Soc_Alarm()
|
|
|
except Exception as e:
|
|
|
- scheduler.shutdown()
|
|
|
print(repr(e))
|
|
|
mylog.logopt(e)
|