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.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware