Test task
This commit is contained in:
38
src/Scheduler/Tasks/TestTask.php
Normal file
38
src/Scheduler/Tasks/TestTask.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* AVSDev UF Scheduler (https://avsdev.uk)
|
||||||
|
*
|
||||||
|
* @link https://git.avsdev.uk/avsdev/sprinkle-scheduler
|
||||||
|
* @license https://git.avsdev.uk/avsdev/sprinkle-scheduler/blob/master/LICENSE.md (LGPL-3.0 License)
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace UserFrosting\Sprinkle\Scheduler\Scheduler\Tasks;
|
||||||
|
|
||||||
|
use UserFrosting\Sprinkle\Scheduler\Scheduler\BaseTask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Task Class
|
||||||
|
* Base class for scheduled tasks.
|
||||||
|
*
|
||||||
|
* @author Craig Williams (https://avsdev.uk)
|
||||||
|
*/
|
||||||
|
class TestTask extends BaseTask
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Function used to specify the schedule for the task.
|
||||||
|
*/
|
||||||
|
public function schedule()
|
||||||
|
{
|
||||||
|
$this->everyMinute();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function used to specify what the task does.
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$this->ci->debugLogger->debug("running task");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user