Knowledgebase

Setting Up the Scheduler and Queues Print

  • phplaravel, cron, cpanel, php, webhosting, redirects, guide, howto
  • 0

Background work on cPanel.

WHAT THE SCHEDULER NEEDS

A single cron entry, running every minute, invoking the scheduler command.

WHAT TO SPECIFY IN THE CRON ENTRY

The full path to the correct PHP version The full path to the application Output redirected somewhere

WHY FULL PATHS

Cron runs with a minimal environment and inherits nothing.

WHAT TO CHECK

That the entry runs, by scheduling something that writes to a log.

WHAT QUEUES NEED

A worker consuming jobs.

WHAT SUITS SHARED HOSTING

Running the worker for a limited time, started by the scheduler, rather than a persistent process.

WHY

Persistent processes are frequently restricted and consume resources continuously.

WHAT TO CONFIGURE

A limit on how long a worker runs A limit on attempts per job Failed job recording

WHAT TO MONITOR

Queue length Failed jobs Whether the scheduler is running at all

WHAT TO AVOID

A worker holding stale code after deployment.

WHAT TO DO ABOUT THAT

Restart workers as part of deployment.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot