diff --git a/Cronner/Tasks/Parser.php b/Cronner/Tasks/Parser.php index 1f145fa..8c9ea51 100644 --- a/Cronner/Tasks/Parser.php +++ b/Cronner/Tasks/Parser.php @@ -47,7 +47,7 @@ public static function parsePeriod($annotation) $annotation = Strings::trim($annotation); if (Strings::length($annotation)) { if (strtotime('+ ' . $annotation) === FALSE) { - throw new InvalidParameterException("Given period parameter '" . $annotation . "' must be valid for strtotime()."); + throw new InvalidParameterException("Given period parameter '" . $annotation . "' must be valid for strtotime() with '+' sign as its prefix (added by Cronner automatically)."); } $period = $annotation; } diff --git a/README.md b/README.md index 782e5ac..98aaa9c 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,9 @@ every time when Cronner runs. Not required but recommended annotation which specifies period of task execution. The period is minimal time between two executions of the task. It's value can be -anything what is acceptable for `strtotime()` function. +anything what is acceptable for `strtotime()` function. The only restriction is usability +with "+" sign before which is added by Cronner automatically. So `first day of this month` +ia not acceptable however `1 month` is acceptable. **Attention!** The value of this annotation must not contain any sign (+ or -).