Update turn-on-before-sunset.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Sun, 11 Aug 2019 00:55:39 +0000 (17:55 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Sun, 11 Aug 2019 00:55:39 +0000 (17:55 -0700)
official/turn-on-before-sunset.groovy

index 1c8a5db..74bed7d 100644 (file)
@@ -56,12 +56,12 @@ def scheduleTurnOn(sunsetString) {
     //def sunsetTime = Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", sunsetString)
 
     //calculate the offset
-    //def timeBeforeSunset = new Date()
+    def timeBeforeSunset = new Date()
 
-    //log.debug "Scheduling for: $timeBeforeSunset"
+    log.debug "Scheduling for: $timeBeforeSunset"
 
     //schedule this to run one time
-    runOnce("someTime", turnOn)
+    runOnce(timeBeforeSunset, turnOn)
 }
 
 def turnOn() {