PHP Classes

File: src/Examples/README.md

Recommend this page to a friend!
  Classes of Chun-Sheng, Li   Scheduler   src/Examples/README.md   Download  
File: src/Examples/README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Scheduler
Queue jobs to be executed by worker tasks
Author: By
Last change:
Date: 2 months ago
Size: 525 bytes
 

Contents

Class file image Download

Introduction

The `job.php` is the sample code for calling two jobs.

The `WeatherJob` and `MonitorJob`.There are all in the `src` folder.

Create the jobs

If you want to create your own job, you can create the `YourJob` class in `YourJob.php` file and put it in the `src` folder.

And Remember to add the `require_once __DIR__.'/WeatherJob.php';` in `worker.php`.

You have to notice that the namespace so you need to set the right namespace in `YourJob.php` and `job.php`.