-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
* How to add and run task see CronService class description. | ||
* | ||
* @author Vadym Stepanov <[email protected]> | ||
* @date 18.01.2016 | ||
* @date 26.07.2017 | ||
*/ | ||
class CronTask | ||
{ | ||
|
@@ -132,7 +132,7 @@ public function __construct($command, $action = null, array $params = array()) | |
); | ||
} | ||
|
||
if (!empty($action) && !preg_match('/^[a-z0-9]+$/i', $action)) { | ||
if (!empty($action) && !preg_match('/^[a-z0-9\-_]+$/i', $action)) { | ||
throw new InvalidArgumentException( | ||
'Specified action value is not valid. Valid examples: run, index, start' | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,4 +140,4 @@ $task->daily()->hour(18); | |
Author | ||
------------- | ||
|
||
Copyright (c) 2016 by Stevad. | ||
Copyright (c) 2017 by Stevad. |