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
+44
View File
@@ -1612,6 +1612,20 @@ const enUS = {
coverUpload: 'Upload cover image',
coverUploadHint: 'Local preview only for now',
scheduleCoverUploadHint: 'Choose from local files or the asset library',
source: 'Generation source',
sourcePromptRule: 'Custom Prompt',
sourceKolTemplate: 'Refined Template',
kolTemplate: 'Refined template',
kolTemplatePlaceholder: 'Select a subscribed refined template',
kolTemplateEmptyTitle: 'No refined templates available',
kolTemplateEmptyHint:
'This account has no active subscribed refined template package yet. Subscribe in the marketplace first.',
scheduleSection: 'Schedule Policy',
kolInputSection: 'Refined Variables',
kolWebSearch: 'Web search',
kolWebSearchHint: 'Enable it when this refined template allows web search.',
kolKnowledge: 'Knowledge base',
kolKnowledgePlaceholder: 'Optional. Select your knowledge groups for generation',
scheduleTime: 'Schedule article generation',
scheduleEveryDay: 'Every day',
enableWebSearch: 'Enable web search for generation',
@@ -1629,11 +1643,29 @@ const enUS = {
schedule: {
name: 'Task name',
rule: 'Prompt rule',
target: 'Target',
plan: 'Schedule',
cron: 'Frequency',
frequency: 'Frequency',
kindDaily: 'Every day',
kindWeekly: 'Weekdays',
weekdaysLabel: 'Run days',
executionTime: 'Run time',
executionTimeHint:
'New tasks default to a random time between 01:00 and 05:00 to smooth overnight load. You can edit it before saving.',
executionTimeDefault: 'Default staggered time',
to: 'to',
autoPublishPlatforms: 'Auto publish platforms',
autoPublish: 'Auto publish',
manualPublish: 'Manual publish',
nextRun: 'Next run',
dispatchStatus: 'Last dispatch',
dispatchSuccess: 'Success',
dispatchFailed: 'Failed',
dispatchPartialSuccess: 'Partial success',
notDispatched: 'Not dispatched',
footerHint:
'New tasks start with a random time between 01:00 and 05:00, then run at the saved time.',
startAt: 'Start time',
endAt: 'End time',
brand: 'Brand',
@@ -1650,6 +1682,15 @@ const enUS = {
weekly: 'Once weekly',
custom: 'Custom Cron',
},
weekdays: {
mon: 'Mon',
tue: 'Tue',
wed: 'Wed',
thu: 'Thu',
fri: 'Fri',
sat: 'Sat',
sun: 'Sun',
},
},
instant: {
title: 'Instant Generate',
@@ -1700,8 +1741,11 @@ const enUS = {
generateSubmitted: 'Generation task submitted.',
missingTaskName: 'Enter a task name first.',
missingPromptRule: 'Choose a prompt first.',
missingKolTemplate: 'Choose a subscribed refined template first.',
invalidGenerateCount: 'Article count must be at least 1.',
invalidScheduleTime: 'Choose a valid schedule time.',
invalidRandomWindow: 'The schedule time configuration is invalid.',
missingScheduleDays: 'Select at least one run day.',
missingPublishAccounts: 'Choose at least one media account when auto publish is enabled.',
missingScheduleCover: 'A selected media account platform requires a cover image.',
missingPromptName: 'Enter a prompt name first.',