Tudásbázis
The servers_queue Script Kinyomtatja ezt a cikket
Overview:
This script allows you to manage the task queue system. The task queue system allows cPanel & WHM to execute tasks as a background process to improve server response time. You can use WHM’s Task Queue Monitor interface (WHM >> Home >> Server Status >> Task Queue Monitor) to view tasks in real time.
Warning:
- This script is for advanced users only. Modifying a task queue process may render your server nonfunctional.
- You should always use cPanel, L.L.C.’s documented API functions for the appropriate task.
- The name of modules monitored by the task queue system are subject to change.
Note:
- The
queueprocd
daemon in the/usr/local/cpanel/libexec
directory periodically processes the task queue. The cPanel & WHM startup process starts this daemon. To restart it, use the/usr/local/cpanel/scripts/restartsrv_queueprocd
script. - The
chksrvd
daemon monitors thequeueprocd
daemon.
Run the script
To run this script on the command line, use the following format:
/usr/local/cpanel/bin/servers_queue [options]
Options
Use the following options with this script:
Options | Description | Example |
---|---|---|
queue |
Use this option to add a subprocess to the task queue. When you queue a task, the system returns a unique task ID. For example:TQ:TaskQueue-Scheduler:5912 In this example, 5912 is the assigned task ID. |
/usr/local/cpanel/bin/servers_queue queue apache_restart |
unqueue |
Use this option to dequeue a task from the task queue. Note:
When you use this option, you must provide the task’s unique task ID with it. The system outputs this unique ID when you queue a task. You can also locate the task ID number in the
/var/cpanel/taskqueue/servers_queue.json file. |
/usr/local/cpanel/bin/servers_queue unqueue TQ:TaskQueue-Scheduler:5912 |
schedule |
Use this option to specify a wait time, in seconds, and add a subprocess to the task queue. The task queue will not process the command until after the wait time passes. | /usr/local/cpanel/bin/servers_queue schedule 600 apache_restart |
unschedule |
Use this option to remove a task from the task queue. Note:
When you use this option, you must provide the task’s unique task ID with it. The system outputs this unique ID when you queue a task. You can also locate the task ID number in the
/var/cpanel/taskqueue/servers_queue.json file. |
/usr/local/cpanel/bin/servers_queue unschedule TQ:TaskQueue-Scheduler:5912 |
run |
Use this option to perform a synchronous flush of the task queue. This runs all the task queue’s queued jobs immediately. This argument does not return output. | /usr/local/cpanel/bin/servers_queue run |
help |
Use this option to display usage information for the script. | /usr/local/cpanel/bin/servers_queue help |
Hasznosnak találta ezt a választ?
Kapcsolódó cikkek
WHM Scripts
Overview: The cPanel & WHM installation process adds important scripts to your server’s...
Overview: The cPanel & WHM installation process adds important scripts to your server’s...
The dbmaptool Script
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
The auto-adjust-mysql-limits Script
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
The autossl_check Script
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...
The backup Script
Overview: Use the /usr/local/cpanel/bin/backup script to run a manual backup in WHM via the...
Overview: Use the /usr/local/cpanel/bin/backup script to run a manual backup in WHM via the...