win-local-inc / remote-cron
A package for remote cron.
Installs: 4 230
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- laravel/framework: ^v8.0.0|^v9.0.0|^v10.0.0
Requires (Dev)
- laravel/pint: ^1.6
- nunomaduro/collision: ^7.4
- orchestra/testbench: ^8.3
This package is auto-updated.
Last update: 2024-10-19 08:55:56 UTC
README
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