https://github.com/getpinga/crontab
A crontab written in PHP based on workerman
https://github.com/getpinga/crontab
Last synced: about 1 year ago
JSON representation
A crontab written in PHP based on workerman
- Host: GitHub
- URL: https://github.com/getpinga/crontab
- Owner: getpinga
- License: mit
- Created: 2024-01-10T15:26:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T15:49:53.000Z (over 2 years ago)
- Last Synced: 2025-02-03T14:13:12.942Z (over 1 year ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Crontab
A crontab with precision in seconds written in PHP based on [workerman](https://github.com/walkor/workerman), [workerman/crontab](https://github.com/walkor/crontab) and [hyperf/crontab](https://github.com/hyperf/crontab).
# Install
```
composer require pinga/crontab
```
# Usage
start.php
```php
onWorkerStart = function () {
// Execute the function in the first second of every minute.
new Crontab('1 * * * * *', function(){
echo date('Y-m-d H:i:s')."\n";
});
};
Worker::runAll();
```
Run with commands `php start.php start` or php `start.php start -d`