Navigation Menu

Skip to content

Support global timer

Compare
Choose a tag to compare
@hhxsv5 hhxsv5 released this 06 Aug 11:02
// Register cron jobs in file "config/laravels.php"
[
    // ...
    'timer'          => [
        'enable' => true,
        'jobs'   => [
           //...
        ],
        'max_wait_time' => 5, // Max waiting time of reloading
        // Enable the global lock to ensure that only one instance starts the timer when deploying multiple instances.
        // This feature depends on Redis, please see https://laravel.com/docs/7.x/redis
        'global_lock'     => true,
        'global_lock_key' => config('app.name', 'Laravel'),
    ],
    // ...
];