giip
SES 商機登記
5分鐘閱讀

CQE Repository Script Management Guide

Learn how to manage, execute, and monitor script registration in the CQE (Custom Query Engine) Repository.

🤖 前往 CQE 儲存庫列表 →

📋 Overview

The CQE Repo List provides a centralized repository for your maintenance and diagnostic scripts. You can store scripts once and deploy them across any number of logical servers (LSVR) with custom execution parameters.

🔍 Script Details & Execution

When you click on a script in the list, the detail modal opens with the following capabilities:

1. Script Content

View the full source code of the script. This is read-only in the list view; use the edit feature if modifications are needed.

2. Execution Settings (NEW)

Before registering a script to a server, you can configure how it should run:

  • Active: Toggle whether the script is enabled for the selected servers.
  • Repeat: If enabled, the script will run periodically.
  • Interval (min): Set the frequency for repeated execution (in minutes).
  • Start Date: Specify when the first execution should occur.

3. Server Registration (LSVR Queue Put)

You can select one or more servers from your current project to receive this script.

  • LSVR Selector: Use the checkboxes to choose target servers.
  • Add to Queue: Click this button to register the script with the defined settings for all selected servers.

📊 Script Usage Status

At the bottom of the modal, the Usage Status Table displays all servers currently registered for this specific script.

  • Hostname: The name of the server using the script.
  • Usage: The logical server's defined purpose.
  • Settings: View the active/repeat/interval status for each registration.
  • Last Run: Tracks the last time the script was successfully executed on that machine.

API 參考

有關此功能的 API 詳細規範,請參閱專用指南。

📘 系統管理 API 參考

疑難排解

症狀原因解決
加入佇列後腳本仍未執行執行設定中 啟用 (Active) 處於關閉狀態在詳細視窗中開啟 Active,然後重新加入佇列。
LSVR 選擇器中看不到目標伺服器目前所選專案沒有伺服器,或伺服器屬於其他專案確認已在頂部選擇正確的專案。
重複執行未生效已開啟 重複 (Repeat),但 間隔 (分鐘) 為空將間隔設定為 1 或更大後重新註冊。
使用狀況中的 最後執行 未更新目標伺服器的代理尚未接收到佇列檢查代理連線狀態以及開始時間是否為過去時刻。

🔌 CQE API (自動化)

上述介面操作對應以下 CQE API 動詞(byAK/bySk 分派器)。請求傳送 text(動詞+參數名)、jsondata(值)與 token

  • CQERepoPut msName msDetail msBody msPer msPrice msType — 將指令碼註冊到儲存庫。msTypeps1 / cmd / wsf 之一。
  • CQEQueuePut mssn lssngroup csn interval active script_type custom_values repeat startdate auid — 將指令碼指派到伺服器。
    • lssngroup: 逗號分隔的 LSSN 清單(每台伺服器一筆指派)。
    • interval: 分鐘。repeat: 0/1 = 一次性, 2 = 遞迴(每隔 interval 重複)。
    • custom_values: 依伺服器注入的值 → 取代指令碼內容中的 {{CustomVariables}}
  • CQEQueueGet lssn hostname os op — 代理輪詢以接收下一個指令碼內容。

指令碼內容佔位符: {{CustomVariables}}(每次指派的 custom_values,伺服器端注入)、{{sk}}(代理權杖)、{{lssn}}(代理 LSSN)。

執行限制: 代理在暫存檔中以 60 秒逾時 執行每個指令碼,ps1 在 Windows PowerShell 5.1 下執行。請保持指令碼簡短。

完整規格: giipdb docs/30_Specs/CQE_SPECIFICATION.md


Version: 1.2 Last Updated: 2026-07-23 Source File: giipv3/public/help/cqerepolist.en.md