All settings live in Daycry\Jobs\Config\Jobs. Copy the file into your application
(app/Config/Jobs.php, keeping the Config namespace) to override defaults — CodeIgniter's
service locator favours the application namespace.
Every property documented below exists in the v3 Config\Jobs. Nothing here is invented.
Single source of truth mapping a handler key to a JobHandlerInterface class. HandlerRegistry resolves keys exclusively from here.
$queueHandlers
array<string, list<string>>
[]
Per-queue allowlist of handler keys. A queue listed here may run only the keys it declares. A queue absent from the map (or with an empty list) imposes no restriction — set it explicitly in production so remote queues cannot invoke shell/command.
publicarray$handlers=['command'=>CommandHandler::class,'shell'=>ShellHandler::class,'closure'=>ClosureHandler::class,'event'=>EventHandler::class,'url'=>UrlHandler::class,];// Lock the 'reports' queue to the command handler, and 'web' to url/event only.publicarray$queueHandlers=['reports'=>['command'],'web'=>['url','event'],];
Allowlist of binaries ShellHandler may run. Deny-by-default: an empty list rejects all execution. Entries are matched against the candidate via realpath(), so /tmp/echo cannot impersonate /usr/bin/echo.
$allowAllShellCommands
bool
false
Explicit, insecure escape hatch. When true, ShellHandler runs any binary even with an empty allowlist.
$allowedEvents
list<string>
[]
Allowlist of event names EventHandler may trigger. Empty = deny all (secure default).
// ShellHandler is deny-by-default. Allow specific absolute paths:publicarray$allowedShellCommands=['/usr/bin/ls','/usr/bin/git'];// EventHandler only fires events you explicitly permit:publicarray$allowedEvents=['user.registered','cache.warm'];
ShellHandler executes through proc_open() with an argv array — never /bin/sh -c — so shell
metacharacters carry no attack surface. UrlHandler is SSRF-hardened (http/https only, private/
reserved IPs rejected, SSL verification forced on, redirects disabled). See Security
for the full handler-security model.
HMAC-SHA256 key used to sign queue envelopes. When null, the signer falls back to env('JOBS_SIGNING_KEY') and then to the CodeIgniter Encryption key. If no key resolves, signing/verification operate in insecure pass-through mode (logged as critical).
$verifyEnvelopeSignature
bool
true
When true, the worker rejects messages whose HMAC signature is missing or invalid (when a key is available). Set false only for trusted, private backends.
The signature is computed over the immutable identity fields only (job, payload, queue,
priority, maxRetries, name, identifier); the mutable attempts/schedule are excluded so
the signature survives a requeue. See Security for the key-resolution chain,
verification path, and threat model.
Queue name used by the opt-inDeadLetterQueue::store() helper (a manual, app-level facility). The worker itself does not consult this value — on exhausted retries it calls backend->abandon(), which settles natively (Beanstalk bury, database row marked failed, Redis drop) and logs a critical entry. To actually route a failed job to this queue you must call DeadLetterQueue::store() yourself.
Maximum execution time per job in seconds (0 = unlimited). May be overridden per job.
$defaultTimeout
?int
null
Default per-attempt timeout applied to jobs that do not declare their own via JobBuilder::timeout(). null disables the global timeout.
The runtime enforces the per-job timeout if set, otherwise $defaultTimeout. When PHP pcntl is
available the timeout interrupts the running job (a SIGALRM handler that throws); otherwise it
degrades to a soft post-hoc check that cannot abort a runaway job.
Seconds the worker sleeps after an empty/rate-limited/circuit-open/error cycle before polling again.
$blockingFetch
bool
false
Reserved — not yet wired into the shipped worker; has no effect. The worker always fetches non-blocking (Beanstalk uses a hardcoded reserveWithTimeout(5); Redis uses non-blocking rpoplpush).
$blockingFetchTimeout
int
5
Reserved — not yet wired into the shipped worker; has no effect. (Beanstalk's reserve timeout is hardcoded to 5s, not driven by this value.)
$circuitBreakerThreshold
int
5
Consecutive backend failures before the circuit opens.
$circuitBreakerCooldown
int
60
Seconds the circuit stays open before the worker retries the backend.
Visibility timeout (seconds) the Redis backend reaper uses to decide when an in-flight job belongs to a crashed worker and must be returned to the waiting list.
$databaseVisibilityTimeout
int
300
Visibility timeout (seconds) the database backend reaper uses to return an in_progress row to pending. Must exceed the maximum expected job runtime to avoid reclaiming live jobs.
$serviceBusLockTimeout
int
60
Peek-lock timeout (seconds) requested when locking Service Bus messages. Must be ≥ the maximum job runtime, otherwise the broker may redeliver mid-execution.
These are used by jobs:queue:reap. Beanstalk and Service Bus recover stalled work natively.
FQCN of a MetricsCollectorInterface implementation. null disables metrics (all increment/observe calls no-op). The in-memory default is fine for local/dev but not for production scraping.
Config\Jobs::init(Scheduler $scheduler) is called by jobs:cronjob:run before evaluating due
definitions. Register scheduled jobs on the fluent Scheduler here:
Definitions that declare a queue() are enqueued; the rest run inline. The runner honours
enabled()/environments() and executes in topological order of dependsOn().