Fixed strict option not working (#208)

* Fix for comparing boolean values to string

* Add default value to strict option

* Update documents for strict option

* Update user guide for strict parameter
diff --git a/README.md b/README.md
index 7c3fcc6..891a401 100644
--- a/README.md
+++ b/README.md
@@ -132,6 +132,8 @@
 
   - If it's true, the Trigger will fire at the top of the hour/minute (\**:**:00).
   - Otherwise, the Trigger will fire after the specific seconds (\**:**:00-59).
+  - If you do not set this value, it is set to the default chosen by the operator.
+  - Optionally, string values, `"true"` and `"false"` are also recognized as boolean values.
 
 The delay is determined by the hash value of the Trigger's name, so it keeps the same interval before and after the (re)deployment.
 
diff --git a/action/alarmWebAction.js b/action/alarmWebAction.js
index b2e9bf2..b6145f9 100644
--- a/action/alarmWebAction.js
+++ b/action/alarmWebAction.js
@@ -103,7 +103,7 @@
                     }
                     newTrigger.cron = params.cron;
                     newTrigger.timezone = params.timezone;
-                    newTrigger.strict = params.strict === 'true';
+                    newTrigger.strict = params.strict;
                 } catch(ex) {
                     var message = ex.message !== 'Invalid timezone.' ? `cron pattern '${params.cron}' is not valid` : ex.message;
                     return common.sendError(400, message);
diff --git a/provider/lib/cronAlarm.js b/provider/lib/cronAlarm.js
index ef26668..07053e7 100644
--- a/provider/lib/cronAlarm.js
+++ b/provider/lib/cronAlarm.js
@@ -23,6 +23,7 @@
 
     var maxTriggers = newTrigger.maxTriggers || constants.DEFAULT_MAX_TRIGGERS;
     var delayLimit = validateLimit(parseInt(process.env.ALARM_DELAY_LIMIT)) || 0;
+    var delayDefaultStrict = process.env.ALARM_DELAY_DEFAULT_STRICT || false;
 
     var cachedTrigger = {
         apikey: newTrigger.apikey,
@@ -104,7 +105,7 @@
         var method = "distributeCronAlarm";
 
         var cronFields = (trigger.cron + '').trim().split(/\s+/);
-        if (trigger.strict !== 'true' && cronFields.length === 5 && delayLimit !== 0) {
+        if (!isStrict(trigger.strict) && cronFields.length === 5 && delayLimit !== 0) {
             var newCron = [hashName(trigger.name), ...cronFields].join(' ');
             logger.info(method, trigger.triggerID, 'is converted to', '"' + newCron + '"');
             return newCron;
@@ -123,4 +124,24 @@
         return limit;
     }
 
+    function isStrict(strict) {
+        /**
+         * If the strict variable is not passed from alarmWebAction(User doesn't define strict value),
+         * then the ALARM_DELAY_DEFAULT_STRICT environment variable value is used.
+         */
+        if(strict === undefined || strict === null) {
+            return delayDefaultStrict;
+        }
+
+        /**
+         * "true"(string)   -> true
+         * "false"(string)  -> false
+         * "True"(string)   -> true
+         * "False"(string)  -> false
+         * true(boolean)    -> true
+         * false(boolean)   -> false
+         */
+        return String(strict).toLowerCase() === "true";
+    }
+
 };