Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phpgt/cron
Run scripts or static functions at regular intervals.
https://github.com/phpgt/cron
background-jobs cron cron-runner cronjob cronjob-scheduler crontab regular-intervals
Last synced: about 2 months ago
JSON representation
Run scripts or static functions at regular intervals.
- Host: GitHub
- URL: https://github.com/phpgt/cron
- Owner: PhpGt
- License: mit
- Created: 2018-11-09T16:39:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-09T23:02:54.000Z (almost 2 years ago)
- Last Synced: 2024-08-09T12:09:18.638Z (5 months ago)
- Topics: background-jobs, cron, cron-runner, cronjob, cronjob-scheduler, crontab, regular-intervals
- Language: PHP
- Homepage: https://www.php.gt/cron
- Size: 186 KB
- Stars: 1
- Watchers: 3
- Forks: 3
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Run scripts or static functions at regular intervals.
Define background jobs in standard crontab format and the Cron Runner will execute them when they are due. Jobs can be either normal scripts, or calls to static functions with automatic autoloading taken care of.
***
## Example usage
`crontab` file within your project directory:
```
00 * * * * ExampleClass::hourlyTask()
0 22 * * 1-5 YourApp\Accounts\Daily::nightRoutine("you can pass properties too!")
# This is a comment. The above job will run at 10pm Mon-Fri.
*/10 * * * * ExampleClass::runEveryTenMinutes
```Start the Runner: `vendor/bin/cron`.
If you're using [WebEngine](https://php.gt/webengine), the Cron Runner is automatically started for you by running `gt run`.