feat(server): scheduled jobs on the server and a Scheduled tab in the admin panel
Owner review 2, R10: nothing may run out of sight, so every timer the server ran becomes a system schedule the admin panel shows and manages, and administrators create their own. - SchedulerHost runs the shared Scheduler on the job engine (started after JobEngineHost, stopped before it); ServerScheduleHost gives it the container's time zone (UTC with a warning when TZ is unknown), the archive refreshed from archive.json at every run (what ArchivePolling did), the clean-up steps and the system schedules: archive-scan every 10 minutes (no catch-up, also run once at start like the polling), upload-cleanup every 30 minutes, index-backup at 03:00 (SQLite only), housekeeping (job history) at 04:00 and audit-cleanup at 04:30. - ArchivePolling and DatabaseBackupService are gone; UploadMaintenance only recovers commits at start, its sweep is the "uploads" clean-up step. - /api/v1/schedules (ManageArchive, audited): list with actions and time zone, create, PUT/PATCH, delete (409 schedule_system), run now (409 schedule_pending), reset (409 schedule_no_defaults), runs paged by cursor; invalid fields are 400 invalid_schedule naming the field. - CHRONOS_AUDIT_RETENTION_DAYS (AuditRetentionDays, default 365) seeds the audit clean-up; set by the environment it is applied at every start and locked. Job history leaves Settings: it is the housekeeping schedule's age limit, and the setting is what a reset restores. - Admin panel: Jobs has Queue and Scheduled tabs; schedules with when (in the panel's language and the server's zone), next run, last result, a switch, Run now, Edit, Delete or Reset, their runs linking to the jobs, and a side panel for the action, recurrence and parameters; job rows a schedule queued carry a Scheduled pill. Strings in en and it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 808ce94ae29e3bf4522cb4d40dfd76d4f8529c64)
This commit is contained in:
1 parent
e5508e7e69
commit
75daab7275
66 files changed
+1985
-290
No files matched your search
@@ -283,8 +283,6 @@
|
||||
<data name="Admin.Settings.HttpPort.Tip" xml:space="preserve"><value>通过 HTTP 提供管理面板和 API 的端口</value></data>
|
||||
<data name="Admin.Settings.HttpsPort" xml:space="preserve"><value>HTTPS 端口</value></data>
|
||||
<data name="Admin.Settings.HttpsPort.Tip" xml:space="preserve"><value>通过 TLS 为 Chronos 客户端提供 API 的端口</value></data>
|
||||
<data name="Admin.Settings.JobHistoryDays" xml:space="preserve"><value>任务历史(天)</value></data>
|
||||
<data name="Admin.Settings.JobHistoryDays.Tip" xml:space="preserve"><value>已完成任务的保留天数</value></data>
|
||||
<data name="Admin.Settings.JobPriority.Tip" xml:space="preserve"><value>“{0}”在优先级队列中的级别:级别较高的先运行,并暂停级别较低的</value></data>
|
||||
<data name="Admin.Settings.Jobs" xml:space="preserve"><value>任务</value></data>
|
||||
<data name="Admin.Settings.Language" xml:space="preserve"><value>语言</value></data>
|
||||
@@ -306,7 +304,6 @@
|
||||
<data name="Admin.Settings.ProxyBypassed" xml:space="preserve"><value>未经代理</value></data>
|
||||
<data name="Admin.Settings.ProxyBypassed.Tip" xml:space="preserve"><value>TLS 模式为“反向代理”,但此页面并非经由受信任的代理通过 HTTPS 访问。请通过你的代理打开它,或将代理的地址添加到 CHRONOS_TRUSTED_PROXIES。</value></data>
|
||||
<data name="Admin.Settings.Restart" xml:space="preserve"><value>需要重启</value></data>
|
||||
<data name="Admin.Settings.Restart.Tip" xml:space="preserve"><value>已保存的端口、TLS、工作线程、分块大小或任务历史设置在重启后生效</value></data>
|
||||
<data name="Admin.Settings.Server" xml:space="preserve"><value>服务器</value></data>
|
||||
<data name="Admin.Settings.ServerName" xml:space="preserve"><value>服务器名称</value></data>
|
||||
<data name="Admin.Settings.ServerName.Tip" xml:space="preserve"><value>向客户端和局域网显示的名称</value></data>
|
||||
|
||||
Reference in new issue
Block a user