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.
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
directorytree/opensearch-client
directorytree/opensearch-adapter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata