scryba / laravel-schedule-telegram-output
Laravel package to send scheduled command outputs through Telegram bots
Fund package maintenance!
michael.laweitech.com/buy-me-a-coffee
Requires
- php: ^8.2
- illuminate/console: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0|^10.0
- phpunit/phpunit: ^10.0|^11.0
README
A Laravel package to send scheduled job outputs to Telegram with robust formatting and flexible configuration.
🚀 Quick Start
-
Install:
composer require scryba/laravel-schedule-telegram-output
-
Publish config (optional):
php artisan vendor:publish --provider="Scryba\LaravelScheduleTelegramOutput\ScheduleTelegramOutputServiceProvider" --tag=schedule-telegram-output-config
-
Configure your
.env
:TELEGRAM_BOT_TOKEN=your-telegram-bot-token TELEGRAM_DEFAULT_CHAT_ID=your-chat-id SCHEDULE_TELEGRAM_OUTPUT_DEBUG=true # or false SCHEDULE_TELEGRAM_OUTPUT_PARSE_MODE=MarkdownV2 # or HTML
See Telegram Setup Guide for details.
-
Basic usage:
$schedule->command('your:command')->sendOutputToTelegram();
Or specify a chat ID:
$schedule->command('your:command')->sendOutputToTelegram('123456789');
⚙️ Configuration
- All options are in
config/schedule-telegram-output.php
. - By default, only a snippet of the output (first 10 lines or up to 500 characters) is sent to Telegram.
- You can override the snippet length and other options in your config.
- See the Configuration Reference for all options and details.
📖 Documentation & Guides
- Getting Started Guide
- Telegram Setup Guide
- Configuration Reference
- Advanced Usage
- Examples
- Troubleshooting & FAQ
🧑💻 Advanced & Examples
- See Examples and Advanced Usage for trait-based, multi-bot, and conditional scenarios.
❓ Having issues?
- See Troubleshooting & FAQ
- Or open an issue on GitHub
License
MIT