win-local-inc/remote-cron

A package for remote cron.
4,575
Install
composer require win-local-inc/remote-cron
Latest Version:1.1.0
PHP:^8.0
Laravel:8 · 9 · 10
Older releases:7
License:MIT
Last Updated:Apr 19, 2023
Links: GitHub  ·  Packagist
Maintainer: rawaby88

Remote call Package

Installation

  • update array to your needs in config/remotecron.php with
[
    'middleware' => [
        'throttle:remotecron',
        WinLocal\RemoteCron\Middleware\TokenAuth::class,
    ],
    'path' => env('WINLOCAL_CRON_PATH', 'remote/cron'),
    'queue_connection' => env('WINLOCAL_CRON_QUEUE_CONNECTION', 'redis'),
    'token' => env('WINLOCAL_CRON_TOKEN'),
];
  • add envs :
WINLOCAL_CRON_PATH=
WINLOCAL_CRON_TOKEN=
WINLOCAL_CRON_QUEUE_CONNECTION=
  • each service needs to run supervisor

php artisan queue:work redis --max-time=3600 --max-jobs=100 --tries=3 --timeout=3550

  • new cron jobs needs to be add in super admin service database in tables : cron_services, cron_jobs

cron_services
name: Advert
url: https://sericename.stage.com/remote/cron 
token: ***token***

cron_jobs
name: Report Upload
command: facebook:upload
parameters:
schedule: */10 * * * *

  • to run tests on package

vendor/bin/testbench package:test --configuration=tests/phpunit.xml

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

399,241,428 4,660

Version History

Version Released PHP Laravel License
1.1.0 ^8.0 ^v8.0.0|^v9.0.0|^v10.0.0 MIT
1.0.11 ^7.1|^8.0 ^v7.0.0|^v8.0.0|^v9.0.0|^v10.0.0 MIT