gitea源码

cron.go 550B

123456789101112131415161718192021
  1. // Copyright 2020 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. import "time"
  5. // Cron represents a Cron task
  6. type Cron struct {
  7. // The name of the cron task
  8. Name string `json:"name"`
  9. // The cron schedule expression (e.g., "0 0 * * *")
  10. Schedule string `json:"schedule"`
  11. // The next scheduled execution time
  12. Next time.Time `json:"next"`
  13. // The previous execution time
  14. Prev time.Time `json:"prev"`
  15. // The total number of times this cron task has been executed
  16. ExecTimes int64 `json:"exec_times"`
  17. }