Files
panel/pkg/types/cron.go
T
耗子 d4f85066a0 feat: 计划任务支持备份指定目录功能 (#1540)
在计划任务的备份类型中新增"目录"子类型,支持将任意指定目录打包压缩后
备份到本地或远程存储,并自动清理过期备份。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 02:56:29 +08:00

19 lines
898 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package types
// CronConfig 计划任务结构化配置
type CronConfig struct {
Type string `json:"type"` // 子类型:backup 时为 website/mysql/postgres/pathcutoff 时为 website/container
Flock bool `json:"flock"` // 进程锁
Targets []string `json:"targets"` // 目标列表
Storage uint `json:"storage"` // 存储 ID0=本地)
Keep uint `json:"keep"` // 保留份数
// URL 任务专用
URL string `json:"url"`
Method string `json:"method"` // GET/POST/PUT/DELETE/PATCH/HEAD
Headers map[string]string `json:"headers"` // 自定义请求头
Body string `json:"body"` // 请求体
Timeout uint `json:"timeout"` // 超时时间(秒)
Insecure bool `json:"insecure"` // 忽略证书校验
Retries uint `json:"retries"` // 失败重试次数
}