Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cron Bundle Laravel Package

4lxndr/cron-bundle

View on GitHub
Deep Wiki
Context7
## Getting Started
Install via Composer:
```bash
composer require shapecode/laravel-as-cron-job

Publish the config and migrations:

php artisan vendor:publish --provider="ShapeCode\AsCronJob\AsCronJobServiceProvider"
php artisan migrate

First use case: Define a daily job with pause windows (new in 1.0.2):

use ShapeCode\AsCronJob\AsCronJob;

class MyJob extends AsCronJob
{
    protected $schedule = '* * * * *'; // Runs every minute

    public function getPauseWindows()
    {
        return [
            'weekdays' => [
                'start' => '22:00', // 10 PM
                'end' => '06:00',   // 6 AM
            ],
            'weekends' => [
                'start' => '00:00', // Midnight
                'end' => '00:00',   // All day
            ],
        ];
    }
}

Visualize your schedule with the new command:

php artisan shapecode:cron:visualize

Implementation Patterns

Core Workflow

  1. Define jobs by extending AsCronJob and setting $schedule.
  2. Tag jobs for grouping (e.g., tags: ['reporting']).
  3. Pause windows (new):
    • Use getPauseWindows() to define time ranges where jobs skip execution.
    • Supports per-day or per-weekend logic (e.g., overnight pauses).
  4. Visualize schedules with the ASCII timeline command (new):
    php artisan shapecode:cron:visualize --job=MyJob
    
    Output example:
    █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
    
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager