- How do I install devsrv/laravel-scheduled-action in a Laravel app?
- Install it with Composer using composer require devsrv/laravel-scheduled-action. Then publish any config or migrations if the package provides them, add the package trait to your Eloquent model, and register the scheduler tick in routes/console.php or your console Kernel. Because the last release was in 2023, run a quick compatibility spike on your Laravel and PHP versions before using it on production models.
- Does devsrv/laravel-scheduled-action require a migration or a dedicated database table?
- The README excerpt does not specify whether the package uses a dedicated table, new columns, or existing model timestamp attributes. Based on its model-level scheduling approach, you should expect to define timestamp attributes or publish migrations if the package ships them. Confirm by inspecting the package source and service provider before planning schema changes.
- Which Laravel and PHP versions does devsrv/laravel-scheduled-action support?
- There is no ecosystem signal for Laravel 11 or 12, PHP 8.3 or 8.4, or Octane behavior, and the last release was 2023-03-27. Check the composer.json constraint ranges and run the package test suite against your exact versions rather than relying on permissive constraints. A half-day to one-day compatibility spike is reasonable.
- How does devsrv/laravel-scheduled-action prevent duplicate execution across multiple app servers?
- The README does not document an atomic claim, row lock, cache lock, onOneServer, or withoutOverlapping strategy. Do not assume the package prevents duplicate execution when multiple scheduler nodes run at the same time. Read the source for locking behavior and test with two scheduler processes before relying on it in production.
- Does devsrv/laravel-scheduled-action run actions synchronously or dispatch them to a queue?
- The execution model is not clear from the README excerpt, so it may run synchronously inside the scheduler process or dispatch a queue job. Check the source for dispatch calls and whether queue configuration is available per action. If dispatch is not configurable, long-running actions can block the scheduler tick.
- How do I schedule a model action such as publish at, expire at, or send reminder at?
- Add the package trait to your Eloquent model and set the relevant future timestamp attribute according to the package API, such as publish_at or expire_at. The package abstracts the common Laravel pattern of a scheduled_at column plus a scheduled console command. Verify the exact method names and attribute conventions in the source because documentation is thin.
- What happens if a scheduled model action throws an exception or fails?
- The README does not document whether the schedule is consumed before or after the action runs, or whether retries and dead-letter paths exist. Read the source to determine whether a thrown exception loses the scheduled action or leaves it retryable. Add monitoring around the scheduler and your action logs before production use.
- Is devsrv/laravel-scheduled-action safe to use in production?
- Treat it as a reference implementation rather than a platform dependency: it has a single small vendor, 18 stars, zero dependents, and no release in over two years. It is MIT-licensed and small, but unaudited code inside the model lifecycle carries maintainer and supply-chain risk. Use it only after a source review, a concurrency test, and a plan to fork or replace it.
- How does devsrv/laravel-scheduled-action handle timezones?
- Timezone handling is not documented in the README excerpt, so it may evaluate against app.timezone, UTC, or the database session timezone. Confirm in the source how scheduled timestamps are compared and stored. Write scheduled timestamps in one consistent timezone, preferably UTC, to avoid drift between the model and the scheduler.
- What are alternatives to devsrv/laravel-scheduled-action, and do I need Redis?
- You can implement the same pattern with a scheduled_at column, a scheduled console command, and Laravel's scheduler plus queue system. The package is a convenience layer over those primitives, not a new runtime or datastore. For safe multi-node execution you likely need Redis or another shared lock, and serverless deployments without a cron tick are a poor fit.