diff options
author | zeripath <art27@cantab.net> | 2020-08-24 16:48:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-24 11:48:15 -0400 |
commit | 2ae8c7ab1cc1311a493fa4efa205412664f54f96 (patch) | |
tree | f2259efafea334ef4ff3cae6de952a1d0946623f /modules/structs | |
parent | ee047312a1a3238a8504200f7ded8536ebc838e3 (diff) | |
download | gitea-2ae8c7ab1cc1311a493fa4efa205412664f54f96.tar.gz gitea-2ae8c7ab1cc1311a493fa4efa205412664f54f96.zip |
Add cron running API (#12421)
* Add cron running API
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Apply suggestions from code review
* placate-swagger
Signed-off-by: Andrew Thornton <art27@cantab.net>
* return not found
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Apply suggestions from code review
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/cron.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/structs/cron.go b/modules/structs/cron.go new file mode 100644 index 0000000000..f52a5ed3c9 --- /dev/null +++ b/modules/structs/cron.go @@ -0,0 +1,16 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package structs + +import "time" + +// Cron represents a Cron task +type Cron struct { + Name string `json:"name"` + Schedule string `json:"schedule"` + Next time.Time `json:"next"` + Prev time.Time `json:"prev"` + ExecTimes int64 `json:"exec_times"` +} |