Queue Worker

Horuph Studio Usage Guide Version 1.0.0

What It Is

Queue Worker is the background job processor for your system. It pulls queued tasks (jobs) and runs them outside normal page loads, so heavy work can happen safely in the background.

Two Ways to Run Jobs

Horuph supports two execution modes. Use one of them based on your hosting environment.

1) Dedicated Worker (Cron / Scheduled Execution)

If your environment supports scheduling (cron, task scheduler, hosting panels, server tools), run the dedicated worker script:

core/workers/queue_worker.php

  • Recommended for production (more stable and predictable).
  • Best for higher traffic and larger queues.
  • Keeps background processing separate from web requests.

In this mode, you typically schedule the script to run continuously or at a fixed interval, depending on your server setup and queue workload.

2) Fire Worker (No Cron / No Server Tools)

Fire Worker is a practical fallback for setups where you cannot configure a real scheduler. Examples: limited hosting, lightweight deployments, local devices, or IoT-style environments.

  • Runs jobs automatically when enabled.
  • Uses a heartbeat approach to keep processing alive without cron.
  • Pulse (seconds) controls how often it “ticks”.
  • Type controls how the heartbeat is triggered (based on available options in your system).

Fire Worker is not “magic” — it’s a clean workaround when scheduling tools aren’t available, so the queue can still move forward.

Recommended Setup

  • If you have cron / scheduler: turn Fire Worker off and run the dedicated worker.
  • If you do not have cron / scheduler: keep Fire Worker on.
  • Do not run both unless you understand the impact (duplicate processing / race conditions).

Jobs Tab

The Jobs tab shows queued tasks with filters and search.

  • Status: Filter by job state (Pending, Processing, Done, Failed).
  • Queue: Filter by queue name (useful when multiple queues exist).
  • Search: Find jobs by keywords (based on what your system stores for each job).
  • Bulk Actions: Apply actions to multiple jobs at once (if enabled).

Worker Settings

The Worker Settings tab controls Fire Worker.

  • Active: Enables or disables Fire Worker.
  • Pulse (seconds): How often the heartbeat runs.
  • Type: Heartbeat trigger strategy (example: “Heart Beat on Domain”).
  • Save Changes: Applies your settings.

Troubleshooting

  • If jobs stay in Pending for too long, it usually means no worker is running.
  • If many jobs are stuck in Processing, a job may have crashed or the worker may have been interrupted.
  • If you see unexpected duplicates, make sure only one execution mode is active (Dedicated worker or Fire Worker).
  • If Pulse is too high, the queue will feel slow. If it’s too low, it may create unnecessary load.

Guides & Resources

Explore addons, read usage guides, or start developing your own addon

Build an Addon
If you want to build a new feature, this is the right path: addons are the primary development unit in Horuph and grow without touching the Core.
Learn More
Development Documentation
Technical details for building addons and developing services.
Learn More

Need More Help?

For complete developer documentation and advanced guides, visit the documentation center.