Skip to content

Commit

Permalink
chore: 定时任务之前提前允许一次备份
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Sep 16, 2024
1 parent 3facbab commit 11f313f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ func main() {
log.Fatalf("load config error: %s", err.Error())
}

if conf.Cron == "" {
runBackupTask(conf)
} else {
runBackupTask(conf)
if conf.Cron != "" {
task := cron.New()
_, e := task.AddFunc(conf.Cron, func() {
runBackupTask(conf)
Expand Down

0 comments on commit 11f313f

Please sign in to comment.