This package is a workaround for run tasks without artisan because proc_open & proc_close PHP modules disabled some server such as shared hosts.
stylers/laravel-task-manager is a Laravel package for this package is a workaround for run tasks without artisan because proc_open & proc_close php modules disabled some server such as shared hosts..
It currently has 0 GitHub stars and 543 downloads on Packagist (latest version 6.0.0).
Install it with composer require stylers/laravel-task-manager.
Discover more Laravel packages by stylers
or browse all Laravel packages to compare alternatives.
Last updated
| Laravel version | Package version | |-----------------|-----------------| | 5.7 | 1.0 | | 6.0 | 2.0 | | 7.0 | 3.0 | | 8.0 | 4.0 | | 9.0 | 5.0 | | 10.0 | 6.0 |
composer require stylers/laravel-task-manager
docker run -it --rm -v $PWD:/app -w /app composer sh
composer install
./vendor/bin/phpunit
TaskTimer trait is using Laravel's Schedule Frequency Options
use Illuminate\Console\Command;
use Stylers\TaskManager\Contracts\TaskTimerInterface;
use Stylers\TaskManager\Traits\TaskTimer;
class CommandTask extends Command implements TaskTimerInterface
{
use TaskTimer;
public function handle()
{
//
}
}
use Illuminate\Support\ServiceProvider;
use Stylers\TaskManager\Console\TaskManager;
use Stylers\TaskManager\Tests\Fixtures\CommandTask;
class ScheduleServiceProvider extends ServiceProvider
{
public function boot()
{
parent::boot();
$this->app->booted(function () {
$scheduler = app(TaskManager::class);
// Single task adding
$scheduler->addTasks(
(new CommandTask())->dailyAt('6:00')
);
// ---- OR ----
// Multiple task adding in same time
$scheduler->bulkAddTasks([
(new CommandTask())->dailyAt('6:00'),
(new CommandTask())->weekly(),
]);
});
}
}
use Stylers\TaskManager\Console\TaskManager;
use Illuminate\Support\Facades\Route;
Route::get('/cron', static function () {
TaskManager::run();
});
* * * * * curl -s -X GET -L domain/cron >>/var/log/cron.log 2>&1