Actions64
- 定时任务 Actions
- 订阅管理 Actions
- 环境变量 Actions
- 配置文件 Actions
- 脚本管理 Actions
- 依赖管理 Actions
- 日志管理 Actions
- 系统设置 Actions
Overview
This node integrates with the QingLong Panel API to manage scheduled tasks (crontabs) and other related resources. Specifically, for the "定时任务" (Scheduled Task) resource and the "更新任务状态" (Update Task Status) operation, it allows users to update the status and metadata of one or more scheduled tasks by sending a PUT request to the QingLong API endpoint /open/crons/status.
Common scenarios where this node is beneficial include:
- Automating the management of scheduled tasks in QingLong, such as enabling, disabling, or updating their execution status programmatically.
- Synchronizing task statuses from external systems or workflows.
- Bulk updating multiple tasks' statuses and related information like process ID, log path, and last run times.
Practical example:
- A workflow that monitors external events and updates the status of specific scheduled tasks in QingLong accordingly, ensuring the panel reflects the current state of those tasks.
Properties
| Name | Meaning |
|---|---|
| 请求Body | JSON object containing the update details for the tasks. It includes: |
- ids: Array of task IDs (number[]) to update |
|
- status: Status string to set for the tasks |
|
- pid: Process ID string associated with the task |
|
- log_path: Log file path string |
|
- last_running_time: Timestamp number indicating the last running time |
|
- last_execution_time: Timestamp number indicating the last execution time |
The property expects a JSON input structured like:
{
"ids": [123, 456],
"status": "running",
"pid": "process_789",
"log_path": "/var/log/task.log",
"last_running_time": 1680000000,
"last_execution_time": 1680003600
}
Output
The node outputs the JSON response returned by the QingLong API after attempting to update the task statuses. This response is available under the json.result field of the output item.
The structure of the output depends on the QingLong API's response but typically contains confirmation of the update operation, success indicators, or error messages if the update failed.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential configured in n8n to authenticate requests against the QingLong Panel API.
- The node uses the QingLong API base URL and endpoints; ensure network access to the QingLong server.
- No additional external dependencies beyond the API authentication are required.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrectly formatted JSON in the "请求Body" property may lead to request errors.
- Providing non-existent task IDs in the
idsarray will result in partial or complete failure of the update. - Network connectivity issues to the QingLong API endpoint can cause request timeouts or failures.
Error messages:
- Errors thrown by the node include descriptive messages when an unsupported operation or resource is selected.
- API errors from QingLong are propagated and can indicate invalid parameters or permission issues.
Resolution tips:
- Verify the API key credential is correctly set up and has sufficient permissions.
- Validate the JSON body format before executing the node.
- Confirm that the task IDs exist in QingLong.
- Check network connectivity and firewall settings.
Links and References
- QingLong Panel API documentation: https://qinglong.online/api/
- n8n documentation on creating custom nodes and using credentials: https://docs.n8n.io/
- JSON formatting guide: https://www.json.org/json-en.html