1Panel-dev / 1Panel-dev/1Panel

[Bug] The log output for scheduled tasks has a significant delay

Open
#13,453 1 comment 0 reactions 1 assignee View on GitHub

@wanghe-fit2cloud is already working on this.

Since Aug 3, 2026.

type: optimization
Dominant language
Go
Stars
37k
Forks
3.4k
Avg merge
9h 16m
Merged PRs (30d)
105

Description

Contact Information

No response

1Panel Version

2.2.4

Problem Description

“计划任务”的日志输出有较大延迟,似乎是攒够一波内容后一口气显示。

Steps to Reproduce
例 1,600 秒的内容被一口气输出

测试代码

import time

for i in range(20):
    print(f"当前时间:{time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())}")
    time.sleep(30)
Image
例 2,当积攒的日志内容足够多时,一口气输出 3 至 4 分钟内的日志

测试代码

import time

for i in range(600):
    print(f"当前时间:{time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())}")
    time.sleep(1)

2debdace-5d63-4d18-a50f-c959584463e8.log

Image
The expected correct result

No response

Related log output

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.