Skip to content

Commit

Permalink
Merge pull request #90 from peppeocchi/v3.x
Browse files Browse the repository at this point in the history
Fixes #47
  • Loading branch information
peppeocchi committed Oct 25, 2019
2 parents e1fc0ad + 09d684e commit 4aa28de
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
@@ -1,14 +1,11 @@
language: php
php:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- hhvm

matrix:
allow_failures:
- php: 5.6
- php: hhvm
fast_finish: true

Expand Down
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -18,11 +18,13 @@ or add the package to your `composer.json`
```json
{
"require": {
"peppeocchi/php-cron-scheduler": "2.*"
"peppeocchi/php-cron-scheduler": "3.*"
}
}
```

Scheduler V3 requires php >= 7.1, please use the [v2 branch](https://github.com/peppeocchi/php-cron-scheduler/tree/v2.x) for php versions < 7.1.

## How it works

Create a `scheduler.php` file in the root your project with the following content.
Expand Down Expand Up @@ -125,7 +127,7 @@ $scheduler->call(
There are a few methods to help you set the execution time of your schedules.
If you don't call any of this method, the job will run every minute (* * * * *).

- `at` - This method accepts any expression supported by [mtdowling/cron-expression](https://github.com/mtdowling/cron-expression)
- `at` - This method accepts any expression supported by [dragonmantank/cron-expression](https://github.com/dragonmantank/cron-expression)
```php
$scheduler->php('script.php')->at('* * * * *');
```
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -17,8 +17,8 @@
],
"minimum-stability": "dev",
"require": {
"php": ">=5.5.9",
"mtdowling/cron-expression": "~1.0"
"php": "^7.1",
"dragonmantank/cron-expression": "^2.3"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
Expand Down
2 changes: 1 addition & 1 deletion src/GO/Traits/Interval.php
Expand Up @@ -413,6 +413,6 @@ private function validateCronRange($value, $min, $max)
);
}

return $value;
return (int) $value;
}
}

0 comments on commit 4aa28de

Please sign in to comment.