BuycPanel Blog

BuycPanel Blog

Latest news and updates

What is a Task Queue System?

Posted by Allura on 25 09 2019.

Introduction
This document is for cPanel and WHM version 68. Some activities in them results in restarting of some utilities. The software will restore Apache and the nameserver daemon whenever a user will count on a subdomain.For providing an arm to the requisition, cPanel & WHM has a system for queueing and handling tasks from various subsystems. Instead of the subsystems, the task queue system handles various works on its behalf to cut off the extra load.In the /usr/local/cpanel/libexec directory, user will find the queueprocd daemon that has the work to handle and alter the task queue periodically. Users will require the startup option to initiate this daemon. The /usr/local/cpanel/scripts/restartsrv_queueprocd script can be used to manage this daemon.There is a daemon called the chksrvd daemon that helps in tracking the queueprocd daemon.All the files inside the task queue is saved as JSON files inside the /var/cpanel/taskqueue directory.The Server’s Queue Script
Use the…

Introduction

This document is for cPanel and WHM version 68. Some activities in them results in restarting of some utilities. The software will restore Apache and the nameserver daemon whenever a user will count on a subdomain.

For providing an arm to the requisition, cPanel & WHM has a system for queueing and handling tasks from various subsystems. Instead of the subsystems, the task queue system handles various works on its behalf to cut off the extra load.

In the /usr/local/cpanel/libexec directory, user will find the queueprocd daemon that has the work to handle and alter the task queue periodically. Users will require the startup option to initiate this daemon. The /usr/local/cpanel/scripts/restartsrv_queueprocd script can be used to manage this daemon.

There is a daemon called the chksrvd daemon that helps in tracking the queueprocd daemon.

All the files inside the task queue is saved as JSON files inside the /var/cpanel/taskqueue directory.

The Server’s Queue Script

Use the /usr/local/cpanel/bin/servers_queue script for administering the tasks inside the task queue system.

While calling the /usr/local/cpanel/bin/servers_queue script, use these arguments:

  • You can avail of the queue argument to make a passage for quoted command string to be added to the task queue. If it’s successful, you get this message:

/usr/local/cpanel/bin/servers_queue queue ‘apache_restart’

  • You can avail enqueue argument to eliminate tasks from the task queue system. To get the task ID number, visit the /var/cpanel/taskqueue/servers_queue.json file. it is successful; you get this message:

/usr/local/cpanel/bin/servers_queue unqueue TQ:TaskQueue:3

  • You can avail schedule argument to put in a waiting time along with the command string to be added. If successful, you get this message:

/usr/local/cpanel/bin/servers_queue schedule 600 ‘apache_restart’

  • You can avail unschedule argument to eliminate the tasks from the system. You get this message on its succession:

/usr/local/cpanel/bin/servers_queue unschedule TQ:TaskQueue-Scheduler:43

  • Avail run argument to function a synchronized working of task queue. This will make all the files start running at once, in a synchronized way. You do not get any output here.

Example: /usr/local/cpanel/bin/servers_queue run

  • Avail help argument to grab usage knowledge concerning the script.

Example: /usr/local/cpanel/bin/servers_queue help

Task Queue Subprocesses

  1. For creating a new account, user can navigate to WHM’s Create a New Account interface (WHM >> Home >> Account Functions >> Create a New Account).
  2. For modifying an account, the user can navigate to WHM’s Modify an Account interface (WHM >> Home >> Account Functions >> Modify an Account).
  3. For terminating an account, the user can navigate to WHM’s Terminate Accounts interface (WHM >> Home >> Multi Account Functions >> Terminate Accounts).
  4. For upgrading or downgrading an account, the user can navigate to WHM’s Upgrade Downgrade an Account interface (WHM >> Home >> Account Functions >> Upgrade/Downgrade an Account).
  5. For changing an IP address for a site, the user can navigate to WHM’s Change Site’s IP Address interface (WHM >> Home >> Account Functions >> Change Site’s IP Address).
  6. For Apache related functions present in Tweak Settings Interface, the user has to navigate to WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).
  7. For copying an account from a different server, the user has to navigate to WHM’s Transfers section (WHM >> Home >> Transfers).
  8. For adding or eliminating an addon domain, navigate to cPanel’s Addon Domains interface (cPanel >> Home >> Domains >> Addon Domains).
  9. For creating or eliminating a subdomain, navigate to cPanel’s Subdomains interface (cPanel >> Home >> Domains >> Subdomains).
  10. For creating or eliminating an alias (parked domain), navigate to cPanel’s Aliases interface (cPanel >> Home >> Domains >> Aliases).

Conclusion

All valuable data regarding the task queue system is reviewed in this article.