diff --git a/src/crontab/src/Annotaion/Mapping/Cron.php b/src/crontab/src/Annotaion/Mapping/Cron.php index f17d8de..3bfade5 100644 --- a/src/crontab/src/Annotaion/Mapping/Cron.php +++ b/src/crontab/src/Annotaion/Mapping/Cron.php @@ -36,7 +36,7 @@ class Cron public function __construct(array $values) { if (isset($values['value'])) { - $this->value = $values['value']; + $this->value = str_replace('\\', "", $values['value']); } } diff --git a/src/crontab/src/CrontabExpression.php b/src/crontab/src/CrontabExpression.php index 02f45b2..e1d023f 100644 --- a/src/crontab/src/CrontabExpression.php +++ b/src/crontab/src/CrontabExpression.php @@ -96,7 +96,7 @@ protected static function checkCronItem(string $value, int $rangeStart, int $ran return true; } if (strpos($value, '/') !== false) { - str_replace('*', '0', '$value'); + $value=str_replace('*', '0', $value); [$start, $end] = explode('/', $value); if (!ctype_digit($start) || !ctype_digit($end)) { return false; @@ -146,7 +146,7 @@ public static function parseCronItem(string $cronExpress): array $times[$k] = $item; } if (strpos($item, '/') !== false) { - str_replace('*', '0', '$value'); + $item=str_replace('*', '0', $item); [$start, $end] = explode('/', $item); while ($start <= $maxLimit[$k]) { $times[$k][] = $start;