I have a new simple project that is only meant to do one thing, on 2 pm every Friday run a batch file. It was giving me issues doing it strictly in the tags, so I tried bringing the logic over to a button for testing and it works fine. Any idea why?
This is the script attached to the button -
if system.tag.read("DayOfWeek").value==5 and system.tag.read("HourOfDay").value==14:
system.util.execute(["C:\NAS_Backup_BatFiles\Bay1_Cust_Backup.bat"])
And similarly for inside the HourOfDay Tag Event valueChanged -
if system.tag.read("[~]DayOfWeek").value==5 and system.tag.read("[~]HourOfDay").value==14:
system.util.execute(["C:\NAS_Backup_BatFiles\Bay1_Cust_Backup.bat"])
I know this must be a syntax thing. What is going wrong here?