feat(schedule): support KOL subscription targets and random time windows
Frontend CI / Frontend (push) Successful in 3m37s
Backend CI / Backend (push) Failing after 6m47s

Extend schedule tasks to dispatch KOL subscription prompts in addition
to prompt rules, add daily/weekly scheduling with fixed or random time
windows, and track dispatch outcomes (last run, status, consecutive
failures).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-22 23:51:45 +08:00
parent 9cc6537e68
commit c28c4f1419
20 changed files with 3034 additions and 329 deletions
+42
View File
@@ -1520,6 +1520,19 @@ const zhCN = {
coverUpload: "上传封面图",
coverUploadHint: "当前仅做本地预览",
scheduleCoverUploadHint: "从本地或素材库选择",
source: "生成来源",
sourcePromptRule: "自定义 Prompt",
sourceKolTemplate: "精调模版",
kolTemplate: "精调模版",
kolTemplatePlaceholder: "请选择已订阅的精调模版",
kolTemplateEmptyTitle: "暂无可用精调模版",
kolTemplateEmptyHint: "当前账号还没有订阅可用的精调模版包,请先到精调模版市场完成订阅。",
scheduleSection: "调度策略",
kolInputSection: "精调变量",
kolWebSearch: "联网搜索",
kolWebSearchHint: "该精调模版允许联网搜索时可开启。",
kolKnowledge: "知识库引用",
kolKnowledgePlaceholder: "可选,选择你的知识库分组辅助生成",
scheduleTime: "定时生成文章",
scheduleEveryDay: "每天",
enableWebSearch: "生成文章联网搜索",
@@ -1537,11 +1550,28 @@ const zhCN = {
schedule: {
name: "任务名称",
rule: "关联规则",
target: "生成目标",
plan: "调度计划",
cron: "执行频率",
frequency: "频率",
kindDaily: "每天",
kindWeekly: "按星期",
weekdaysLabel: "执行日",
executionTime: "执行时间",
executionTimeHint:
"新建任务会默认随机落在 01:00-05:00,避免凌晨任务集中;你也可以手动修改为固定执行时间。",
executionTimeDefault: "默认错峰生成",
to: "至",
autoPublishPlatforms: "自动发布平台",
autoPublish: "自动发布",
manualPublish: "手动发布",
nextRun: "下次执行",
dispatchStatus: "最近调度",
dispatchSuccess: "成功",
dispatchFailed: "失败",
dispatchPartialSuccess: "部分成功",
notDispatched: "未调度",
footerHint: "新建任务默认给出凌晨 1 点到 5 点之间的随机时间,保存后按所选时间执行。",
startAt: "开始时间",
endAt: "结束时间",
brand: "关联品牌",
@@ -1558,6 +1588,15 @@ const zhCN = {
weekly: "每周一次",
custom: "自定义 Cron",
},
weekdays: {
mon: "周一",
tue: "周二",
wed: "周三",
thu: "周四",
fri: "周五",
sat: "周六",
sun: "周日",
},
},
instant: {
title: "即时生成",
@@ -1608,8 +1647,11 @@ const zhCN = {
generateSubmitted: "生成任务已提交",
missingTaskName: "请先填写任务名称",
missingPromptRule: "请先选择 Prompt",
missingKolTemplate: "请先选择已订阅的精调模版",
invalidGenerateCount: "生成篇数至少为 1",
invalidScheduleTime: "请选择有效的定时时间",
invalidRandomWindow: "执行时间配置不正确",
missingScheduleDays: "请至少选择一个执行日",
missingPublishAccounts: "开启自动发布后,请至少选择一个媒体账号",
missingScheduleCover: "已选媒体账号的平台要求封面图,请先设置封面",
missingPromptName: "请先填写 Prompt 名称",