Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:recycle: 重构定时任务实现 https://github.com/siyuan-note/siyuan/issues/7171

Liang Dinga341bba76135
diff --git a/kernel/job/cron.go b/kernel/job/cron.go
index 60b1fea5c8..bdbe1f6010 100644
--- a/kernel/job/cron.go
+++ b/kernel/job/cron.go
@@ -29,7 +29,7 @@ import (
func StartCron() {
s := gocron.NewScheduler(time.Local)
- s.Every(100).Milliseconds().Do(task.ExecTaskJob)
+ s.Every(1).Seconds().Do(task.ExecTaskJob)
s.Every(5).Seconds().Do(task.StatusJob)
s.Every(1).Second().Do(treenode.SaveBlockTreeJob)
s.Every(5).Seconds().Do(model.SyncDataJob)
@@ -43,6 +43,5 @@ func StartCron() {
s.Every(7).Seconds().Do(model.OCRAssetsJob)
s.Every(7).Seconds().Do(model.FlushAssetsTextsJob)
s.Every(30).Seconds().Do(model.HookDesktopUIProcJob)
- s.SingletonModeAll()
s.StartAsync()
}