Skip to main content

The schedule

Defined in routes/console.php. Every entry is withoutOverlapping(), onOneServer() and runInBackground(), and pinned to UTC so the cadence does not drift with server timezone.
weekly:prompt-batch has run daily since July 2026. The command name was left alone so existing deployments, runbooks and log filters kept working — treat the name as historical.
For the schedule to fire, the host needs the single Laravel cron entry:
onOneServer() requires a shared cache store across web nodes. The default CACHE_STORE is database, which satisfies this as long as all nodes share the database.

Manual commands

Beyond the scheduled four:

Queue workers

QUEUE_CONNECTION defaults to database. config/queues.php sits alongside Laravel’s own config/queue.php and holds the application’s queue naming, so check both when routing a job to a specific worker. In production, run a supervised worker rather than queue:listen:
Provider calls are slow — batch fetches in particular — so keep the timeout generous. Jobs that exceed it are retried, which means duplicate provider spend.

Batch behaviour

config/ai.php controls batch submission: Not every provider supports batching. OpenAI’s entry sets 'batch_supported' => false deliberately — the comment in config/ai.php notes it was disabled in favour of realtime processing — so OpenAI requests are issued directly regardless of AI_BATCH_ENABLED.

Failure handling

  • Failed jobs land in the failed_jobs table; php artisan queue:retry all re-dispatches.
  • PromptRunFailureAlert surfaces batches where runs failed.
  • With MATTERMOST_LOG_ENABLED=true, errors are posted to the configured Mattermost channel through the custom log channel in config/logging.php and app/Logging.
When a scheduled command appears to do nothing, check withoutOverlapping() first. A previous run that died without releasing its lock will silently block subsequent runs until the lock expires.