A modern, feature-rich Laravel package for managing scheduled jobs with a beautiful React dashboard. Zero build required - everything is pre-built and ready to use!
- Modern React Dashboard - Beautiful UI built with shadcn/ui and Inertia.js
- Dynamic Job Management - Create, edit, enable/disable scheduled jobs
- Real-time Execution - Run jobs manually with live output
- Comprehensive Logging - Track job execution history and errors
- Job Details Modal - Click any job or log to view complete details
- Cron Expression Builder - Visual cron builder with quick examples
- Timezone Support - Set different timezones per job
- Route Prefix Configuration - Customize dashboard URLs via config
- Zero Build Required - Pre-built assets, no npm/webpack needed
- Laravel Integration - Seamless integration with Laravel's scheduler
- Database Migrations - Automatic table creation
- Service Provider - Easy Laravel integration
- Error Handling - Robust error logging and display
- Example Seeder - Demo jobs included
- Test Suite - Comprehensive test coverage with GitHub Actions CI/CD
composer require sdkwala/laravel-dynamic-scheduler-uiphp artisan vendor:publish --provider="Sdkwala\Scheduler\SchedulerServiceProvider"This will publish:
- Configuration file:
config/scheduler.php - Database migrations
- Public assets (CSS/JS)
php artisan migrateThis creates the required database tables:
scheduled_jobs- Stores job definitionsscheduled_job_logs- Stores execution logs
Visit /scheduler in your browser. The dashboard is ready to use!
-
Via Dashboard:
- Go to
/scheduler - Click "Create New Job"
- Fill in job details (name, command, schedule, timezone)
- Use the cron builder for easy schedule creation
- Go to
-
Via Code:
use Sdkwala\Scheduler\Models\ScheduledJob; ScheduledJob::create([ 'name' => 'Daily Backup', 'command' => 'backup:run', 'schedule' => '0 2 * * *', // Daily at 2 AM 'timezone' => 'UTC', 'is_active' => true, ]);
- Enable/Disable: Toggle job status from the dashboard
- Manual Execution: Click "Run" to execute jobs manually
- Edit Jobs: Modify job settings anytime
- View Logs: See execution history and errors
- Job Details: Click any job row to view complete information
- Dashboard Logs: See latest 5 logs per job on the main page
- Full Log History: Visit
/scheduler/logsfor complete log history - Log Details: Click any log entry to view full output and errors
Customize the dashboard URL by editing config/scheduler.php:
return [
'route_prefix' => 'admin/scheduler', // Default: 'scheduler'
// ... other config options
];After changing the prefix:
php artisan route:clearThe package includes a comprehensive list of timezones organized by region. You can customize this list by editing config/scheduler.php:
'available_timezones' => [
'UTC' => 'UTC',
'North America' => [
'America/New_York' => 'Eastern Time',
'America/Chicago' => 'Central Time',
'America/Denver' => 'Mountain Time',
'America/Los_Angeles' => 'Pacific Time',
'America/Toronto' => 'Toronto',
'America/Vancouver' => 'Vancouver',
],
'Europe' => [
'Europe/London' => 'London',
'Europe/Paris' => 'Paris',
'Europe/Berlin' => 'Berlin',
'Europe/Moscow' => 'Moscow',
'Europe/Dublin' => 'Dublin',
],
'Asia' => [
'Asia/Tokyo' => 'Tokyo',
'Asia/Kolkata' => 'Kolkata (India)',
'Asia/Dubai' => 'Dubai',
'Asia/Shanghai' => 'Shanghai',
'Asia/Singapore' => 'Singapore',
'Asia/Bangkok' => 'Bangkok',
'Asia/Seoul' => 'Seoul',
],
'Australia & Pacific' => [
'Australia/Sydney' => 'Sydney',
'Australia/Melbourne' => 'Melbourne',
'Pacific/Auckland' => 'Auckland',
],
'Other' => [
'Africa/Cairo' => 'Cairo',
'Africa/Johannesburg' => 'Johannesburg',
'America/Sao_Paulo' => 'SΓ£o Paulo',
],
],To add custom timezones:
- Edit
config/scheduler.php - Add your timezone to the appropriate region or create a new region
- Use the format:
'Timezone/Identifier' => 'Display Name'
The package includes robust validation for cron expressions:
- Format Validation: Ensures proper cron syntax (5 fields: minute hour day month weekday)
- Runtime Validation: Uses the CronExpression library to validate expressions
- Error Messages: Clear error messages for invalid expressions
Valid Examples:
* * * * *- Every minute0 2 * * *- Daily at 2 AM0 0 1 * *- Monthly on 1st0 9 * * 1-5- Weekdays at 9 AM*/15 * * * *- Every 15 minutes
Invalid Examples:
* * * *- Missing field60 * * * *- Invalid minute (0-59)* 25 * * *- Invalid hour (0-23)* * 32 * *- Invalid day (1-31)
GET /{prefix}- Main dashboardGET /{prefix}/create- Create new jobPOST /{prefix}- Store new jobGET /{prefix}/{id}/edit- Edit jobPUT /{prefix}/{id}- Update jobDELETE /{prefix}/{id}- Delete jobPOST /{prefix}/{id}/run- Run job manuallyGET /{prefix}/logs- View all logs
The package automatically integrates with Laravel's scheduler. Jobs created via the dashboard will be automatically registered with Laravel's Schedule facade.
// In your App\Console\Kernel.php
protected function schedule(Schedule $schedule)
{
// Your existing scheduled jobs...
// The package automatically adds dynamic jobs here
}- Job Table: View all scheduled jobs with status, last run, next run
- Quick Actions: Run, edit, enable/disable, delete jobs
- Tab Navigation: Switch between dynamic jobs and Artisan schedule
- Job Details Modal: Click any job row to view complete information
- Complete History: View all job execution logs
- Filter Options: Filter by job, status, date range
- Log Details Modal: Click any log to view full output and errors
- Cron Builder: Visual cron expression builder
- Timezone Selection: Choose timezone per job
- Validation: Real-time form validation
- Quick Examples: Pre-built cron examples
1. Logs not appearing for scheduled runs:
- Check Laravel logs for errors
- Ensure your cron job is running:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1 - Verify database migrations are run
2. Dashboard not loading:
- Ensure assets are published:
php artisan vendor:publish --provider="Sdkwala\Scheduler\SchedulerServiceProvider" - Clear route cache:
php artisan route:clear
3. Jobs not executing:
- Check if jobs are enabled in the dashboard
- Verify cron expressions are valid
- Check Laravel logs for errors
4. Modal not working:
- Ensure you're using the latest version
- Clear browser cache
- Check browser console for JavaScript errors
# Check if jobs are registered
php artisan schedule:list
# Test a specific job
php artisan schedule:test
# Clear all caches
php artisan config:clear && php artisan route:clear && php artisan view:clearRun the comprehensive test suite:
# Install dependencies
composer install
# Run all tests
vendor/bin/phpunit
# Run specific test files
vendor/bin/phpunit tests/ScheduledJobTest.php
vendor/bin/phpunit tests/SchedulerControllerTest.php
# Run JavaScript tests
npm install
npm run buildThis package includes GitHub Actions workflows that automatically run tests on:
- Push to
mainbranch - Pull requests to
mainbranch
The CI pipeline tests:
- PHP compatibility (8.1, 8.2, 8.3)
- Laravel compatibility (10., 11., 12.*)
- JavaScript build process
- Security vulnerabilities
- Code quality checks
For detailed testing information, see TESTING.md.
For development, customization, and contribution instructions, see DEVELOPMENT.md.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This package is open-sourced software licensed under the MIT license.
- GitHub: https://github.com/sdkwala/laravel-dynamic-scheduler-ui
- Packagist: https://packagist.org/packages/sdkwala/laravel-dynamic-scheduler-ui
- Issues: https://github.com/sdkwala/laravel-dynamic-scheduler-ui/issues
Built with β€οΈ using Laravel, React, Inertia.js, and shadcn/ui