JobPerMin.php 478 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace EasySwoole\Crontab\Tests\Jobs;
  3. use EasySwoole\Crontab\JobInterface;
  4. class JobPerMin implements JobInterface
  5. {
  6. public function jobName(): string
  7. {
  8. return 'JobPerMin';
  9. }
  10. public function crontabRule(): string
  11. {
  12. return '*/1 * * * *';
  13. }
  14. public function run()
  15. {
  16. var_dump(time());
  17. return time();
  18. }
  19. public function onException(\Throwable $throwable)
  20. {
  21. throw $throwable;
  22. }
  23. }