def writeGroupRtdb():
global devCache
tm = utils.today()
monTm = utils.toMonth(tm)
monTm = utils.stringToTime(monTm)
yearTm = utils.toYear(tm)
yearTm = utils.stringToTime(yearTm)
#print utils.now()
for dev in devices:
hisq.writeArchive(dev["devName"],monTm,0,"CALC_ProductionMonth",1)
hisq.writeArchive(dev["devName"],yearTm,0,"CALC_ProductionYear",1)
for group in groups:
hisq.writeArchive(group["farmName"],monTm,0,"CALC_ProductionMonth",1)
hisq.writeArchive(group["farmName"],yearTm,0,"CALC_ProductionYear",1)
if farmCache["farmName"]:
hisq.writeArchive(farmCache["farmName"],monTm,0,"CALC_ProductionMonth",1)
hisq.writeArchive(farmCache["farmName"],yearTm,0,"CALC_ProductionYear",1)
writeGroupRtdb()
at.every().day.at("03:00").do(writeGroupRtdb)
at.start()
可以使用Python的解释器或者编写脚本来进行计算。在解释器中,直接输入a=2+0.5即可,结果会自动显示。在脚本中,可以编写以下代码来进行计算:
```
a = 2 + 0.5
print(a)
```
运行脚本后,结果会被打印出来。