From 76bdfc0ba79e0ed4687a7d0c6f7c9cbd994dd03d Mon Sep 17 00:00:00 2001 From: rtrimana Date: Thu, 8 Aug 2019 08:44:07 -0700 Subject: [PATCH] Adding the method runDaily. --- Methods/runDaily.groovy | 4 ++++ Runner.py | 6 ++++++ run.sh | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 Methods/runDaily.groovy diff --git a/Methods/runDaily.groovy b/Methods/runDaily.groovy new file mode 100644 index 0000000..eeca8c9 --- /dev/null +++ b/Methods/runDaily.groovy @@ -0,0 +1,4 @@ +///////////////////////////////////////////////////////////////////// +def runDaily(String date, Closure methodToCall) { + methodToCall() +} diff --git a/Runner.py b/Runner.py index 9de06d9..ad8dff0 100644 --- a/Runner.py +++ b/Runner.py @@ -15,6 +15,7 @@ GlobalVariablesEachApp = open("GlobalVariables/"+"GlobalVariablesEachApp.groovy" setLocationMode = open("Methods/"+"setLocationMode.groovy", "r") subscribe = open("Methods/"+"subscribe.groovy", "r") runIn = open("Methods/"+"runIn.groovy", "r") +runDaily = open("Methods/"+"runDaily.groovy", "r") unschedule = open("Methods/"+"unschedule.groovy", "r") sendNotificationToContacts = open("Methods/"+"sendNotificationToContacts.groovy", "r") sendSms = open("Methods/"+"sendSms.groovy", "r") @@ -169,6 +170,8 @@ for line in subscribe: Out.write("\t"+line) for line in runIn: Out.write("\t"+line) +for line in runDaily: + Out.write("\t"+line) for line in unschedule: Out.write("\t"+line) for line in sendNotificationToContacts: @@ -220,6 +223,7 @@ GlobalVariablesEachApp = open("GlobalVariables/"+"GlobalVariablesEachApp.groovy" setLocationMode = open("Methods/"+"setLocationMode.groovy", "r") subscribe = open("Methods/"+"subscribe.groovy", "r") runIn = open("Methods/"+"runIn.groovy", "r") +runDaily = open("Methods/"+"runDaily.groovy", "r") unschedule = open("Methods/"+"unschedule.groovy", "r") sendNotificationToContacts = open("Methods/"+"sendNotificationToContacts.groovy", "r") sendSms = open("Methods/"+"sendSms.groovy", "r") @@ -275,6 +279,8 @@ for line in subscribe: Out.write("\t"+line) for line in runIn: Out.write("\t"+line) +for line in runDaily: + Out.write("\t"+line) for line in unschedule: Out.write("\t"+line) for line in sendNotificationToContacts: diff --git a/run.sh b/run.sh index fb9ba25..a7f2689 100755 --- a/run.sh +++ b/run.sh @@ -3,7 +3,7 @@ # Device conflict #python ModelCheck.py ../jpf-core/ ../logs/valves/ ../smartapps/ appLists/device-interaction/valvesAppList appLists/device-interaction/valvesAppList2 #python ModelCheck.py ../jpf-core/ ../logs/acfanheaterSwitches/ ../smartapps/ appLists/device-interaction/acfanheaterSwitchesAppList appLists/device-interaction/acfanheaterSwitchesAppList2 -#python ModelCheck.py ../jpf-core/ ../logs/cameraSwitches/ ../smartapps/ appLists/device-interaction/cameraSwitchesAppList appLists/device-interaction/cameraSwitchesAppList2 +python ModelCheck.py ../jpf-core/ ../logs/cameraSwitches/ ../smartapps/ appLists/device-interaction/cameraSwitchesAppList appLists/device-interaction/cameraSwitchesAppList2 #python ModelCheck.py ../jpf-core/ ../logs/ventfanSwitches/ ../smartapps/ appLists/device-interaction/ventfanSwitchesAppList appLists/device-interaction/ventfanSwitchesAppList2 #python ModelCheck.py ../jpf-core/ ../logs/speeches/ ../smartapps/ appLists/device-interaction/speechesAppList appLists/device-interaction/speechesAppList2 #python ModelCheck.py ../jpf-core/ ../logs/nonHueLights/ ../smartapps/ appLists/device-interaction/nonHueLightsAppList appLists/device-interaction/nonHueLightsAppList2 @@ -12,7 +12,7 @@ #python ModelCheck.py ../jpf-core/ ../logs/alarms/ ../smartapps/ appLists/device-interaction/alarmsAppList appLists/device-interaction/alarmsAppList2 #python ModelCheck.py ../jpf-core/ ../logs/locks/ ../smartapps/ appLists/device-interaction/locksAppList appLists/device-interaction/locksAppList2 #python ModelCheck.py ../jpf-core/ ../logs/musicPlayers/ ../smartapps/ appLists/device-interaction/musicPlayersAppList -python ModelCheck.py ../jpf-core/ ../logs/relaySwitches/ ../smartapps/ appLists/device-interaction/relaySwitchesAppList appLists/device-interaction/relaySwitchesAppList2 +#python ModelCheck.py ../jpf-core/ ../logs/relaySwitches/ ../smartapps/ appLists/device-interaction/relaySwitchesAppList appLists/device-interaction/relaySwitchesAppList2 #python ModelCheck.py ../jpf-core/ ../logs/cameras/ ../smartapps/ appLists/device-interaction/camerasAppList # Physical conflict -- 2.34.1