Weave 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

Crontab Manager Laravel Package

tiben/crontab-manager

Manage server cron jobs from a Laravel web UI. Add, edit, enable, disable, and delete crontab entries, run jobs on demand, and review logs without touching the command line. Supports multiple cron types and per-job scheduling controls.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. tiben/crontab-manager is a framework-agnostic PHP wrapper around the Linux crontab binary, not a Laravel package. It provides no service provider, facade, config publishing, or container bindings. Adopting it means we own a thin adapter layer (service class + facade + config) regardless. More importantly, it solves a problem Laravel already solves: the native scheduler collapses to a single system cron entry (* * * * * php artisan schedule:run) and is the idiomatic answer for ~80% of scheduling needs. The library is only justified in narrow cases — per-tenant/per-user generated cron entries, or an admin UI where operators manage raw crontab lines.

Integration feasibility. Mechanically simple and well-bounded: the API reads, parses, adds, and removes cron lines by identifier/comment, so we can namespace our entries and diff them idempotently. Integration risk concentrates in the environment, not the code: it shells out to crontab, so it requires a POSIX host with cron installed, an executing user permitted to edit its own crontab, and a stable absolute path to the PHP binary. Containers, PaaS (Heroku, Lambda), and Windows dev machines are non-starters without an abstraction we write ourselves.

Technical risk.

  • License. Reported as NOASSERTION. This is a hard procurement gate until legal confirms the LICENSE file against the declared terms; do not merge until cleared.
  • Maintenance. 138 stars, 0 dependents, last release May 2023, effectively a single maintainer. Bus factor of one on a component that mutates production scheduling. Score 1.56 reflects this accurately — treat it as "vendored utility," not "strategic dependency."
  • Security surface. Every managed job becomes a shell command executed as the PHP/FPM user. Any user-supplied input reaching a cron line is command injection. Any tenant able to write a cron entry can potentially read env vars, hit internal endpoints, or persist.
  • Concurrency. The crontab is a mutable shared resource with no locking in the library's model. Two concurrent writes (e.g., two web requests, or a request racing a deploy) can lose updates. We must serialize with a mutex/flock.
  • State. The crontab is the source of truth and lives on the box. It is invisible to infrastructure-as-code, does not survive a rebuild, and drifts silently.

Key questions.

  1. What is the actual license, and who signs off?
  2. Is the requirement genuinely user-defined scheduling, or can Laravel's native scheduler plus a database-driven schedule() loop satisfy it?
  3. Single scheduler host or every app node? (This determines whether crontab is even the right substrate.)
  4. Can we guarantee a cron-capable host and a dedicated unix user for the lifetime of the feature?
  5. Who is paged when cron silently stops writing?
  6. Is there an audit requirement for who created or changed a scheduled job?

Integration Approach

Stack fit. Poor as a first-class dependency, acceptable as a bounded leaf. Recommended pattern: encapsulate behind our own CronManager interface with two implementations — a CrontabDriver (wrapping this library) for the one host that needs it, and a NullDriver/DatabaseDriver for local dev, CI, and containerized environments. Nothing outside that boundary imports the vendor namespace.

Migration path.

  1. Reconcile first. Capture the current crontab (crontab -l) from every target host and version it before any code touches it. Automated writes onto an un-baselined crontab is how outages happen.
  2. Namespace. Reserve a marker block (e.g., # BEGIN app-managed / # END app-managed) and refuse to touch anything outside it. Adopt a stable job-key convention in the comment field so removal is deterministic.
  3. Parallel-run. Introduce the manager to write entries alongside the existing static ones, with the static ones still authoritative, until parity is proven.
  4. Cut over by removing static entries, then enforce a boot-time reconcile.

Compatibility. Confirm PHP 8.2/8.3 support in composer.json — a 2023 release may not have been validated against current runtimes. Pin the version explicitly. Dev containers should ship cron or the NullDriver must be the default binding, otherwise every local composer install inherits an environment-specific failure.

Sequencing. Do a two-day spike in a disposable container against a throwaway user account. Then ship as an internal-only admin tool behind a feature flag. Only then consider exposing it to end users, and only after authz, input validation, audit logging, and rate limiting are in place. Do not let this be the thing that blocks a release.

Operational Impact

Maintenance. Expect to fork or vendor. Small dependency, small API — patching is cheap, but so is the temptation to keep a stale pin. Budget ~1–2 days per year for version bumps and host-level debugging, plus the standing cost of the wrapper layer we own.

Support. The failure surface is operational, not code-level, which means most tickets route to infrastructure. Common causes: cron daemon not running, php not on cron's minimal PATH, permissions on the crontab spool, disk full, and timezone mismatch between host and app. Each needs a documented runbook entry with a one-command diagnostic.

Scaling. This is the disqualifier for anything beyond modest scale. Crontab is per-host, so N app nodes × M jobs means M×N executions unless we pin scheduling to a single node — which reintroduces a single point of failure. If the roadmap includes horizontal scaling or multi-tenant scheduling at volume, the correct target is a distributed scheduler (database-backed withoutOverlapping() jobs on a queue, or an external scheduler), and this package should be scoped out early rather than migrated around later.

Failure modes.

  • Lost update: concurrent writes clobber each other → require flock and verify by re-reading after write.
  • Silent no-op: write appears to succeed but cron isn't running → detect via heartbeat job writing to a table and alert on gap.
  • Orphaned jobs: deleted tenants leave live crontab entries → reconcile on delete, and sweep for unknown keys nightly.
  • Drift: manual edits or host rebuilds diverge from intent → boot-time reconcile against the database, alert on mismatch.
  • Injection: user input in a cron line → strict allowlist on fields (minute/hour/day/month/weekday), never free-text commands.
  • No backup: → snapshot the crontab to object storage before every mutation.

Ramp-up. Low for a mid-level Laravel developer — a day to learn the API, a sprint to build the wrapper, tests, and runbook. The real ramp-up is operational literacy: on-call staff must understand cron semantics, the spool, and the PHP-user boundary. That is a training cost the package does nothing to reduce.

Recommendation. Do not adopt as a core dependency at score 1.56 with an unresolved license. Default to Laravel's native scheduler. If user-defined or per-tenant scheduling is a confirmed requirement, run a scoped spike on a single dedicated host, contingent on (a) legal clearing the license, (b) an accepted ADR acknowledging single-maintainer risk and the single-host scaling ceiling, and (c) the wrapper abstraction shipping in the same PR as the first call site.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings