# Scheduled Session Garbage Collection in Laravel 13.39

DevFeed: [Scheduled Session Garbage Collection in Laravel 13.39](<https://devfeed.tech/articles/scheduled-session-garbage-collection-in-laravel-13-39-106048.md>)

Original publisher: [Read original article](<https://laravel-news.com/laravel-13-39-0>)

Author: Paul Redmond

Published: 2026-10-27T22:35:05Z

Content type: release

Language: en

Sources: [Laravel](<https://devfeed.tech/sources/laravel.md>)

Topics: [Laravel](<https://devfeed.tech/topics/laravel.md>), [Eloquent ORM](<https://devfeed.tech/topics/eloquent.md>)

Tags: [cleanup](<https://devfeed.tech/tags/cleanup.md>), [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [laravel](<https://devfeed.tech/tags/laravel.md>), [laravel-releases](<https://devfeed.tech/tags/laravel-releases.md>), [news](<https://devfeed.tech/tags/news.md>), [scheduled](<https://devfeed.tech/tags/scheduled.md>)

## AI overview

Laravel 13.39 adds scheduled session cleanup and several framework improvements. The new `session:garbage-collect` Artisan command runs the session driver's collector using `session.lifetime`; schedule it, for example, hourly. Expired sessions are otherwise cleaned during a random request according to `config/session.php`'s `lottery`, which can be set to `[0, 100]` to stop request-triggered cleanup. Eloquent models can now use `#[Table(key: false)]` without a primary key or incrementing behavior. `JobAttempted` gains a duration in milliseconds, including for synchronous queue jobs, enabling timing of failed or retried attempts. Other changes include array validation size methods, relationship-aware create and restore methods, and atomic config, route, and event cache writes. Testing updates add `#[WithoutMigrationEvents]`, improve mail and bus fakes, and roll back open transaction levels after each `RefreshDatabase` test. The supplied text also lists assorted bug fixes; it does not provide details for every changelog entry.

## Source excerpt

Laravel 13.39 adds a session:garbage-collect command for scheduled session cleanup, keyless models with #[Table(key: false)], and durations on JobAttempted. The post Scheduled Session Garbage Collection in Laravel 13.39 appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.