Skip to content

Commit 75d8297

Browse files
a1012112796zeripathtechknowlogick
authored
add note about cron.SCHEDULE format in document (#15812)
* add note about ``cron.SCHEDULE`` format in document Signed-off-by: a1012112796 <[email protected]> * Update custom/conf/app.example.ini Co-authored-by: zeripath <[email protected]> Co-authored-by: zeripath <[email protected]> Co-authored-by: techknowlogick <[email protected]>
1 parent 3656a2a commit 75d8297

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

custom/conf/app.example.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,6 +1591,11 @@ PATH =
15911591
;ENABLED = false
15921592
;; Setting this to true will run all enabled cron tasks when Gitea starts.
15931593
;RUN_AT_START = false
1594+
;;
1595+
;; Note: ``SCHEDULE`` accept formats
1596+
;; - Full crontab specs, e.g. "* * * * * ?"
1597+
;; - Descriptors, e.g. "@midnight", "@every 1h30m"
1598+
;; See more: https://pkg.go.dev/github.com/gogs/[email protected]
15941599

15951600
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15961601
;; Basic cron tasks - enabled by default

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,11 @@ NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take ef
704704
- `RUN_AT_START`: **false**: Run cron tasks at application start-up.
705705
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
706706

707+
- `SCHEDULE` accept formats
708+
- Full crontab specs, e.g. `* * * * * ?`
709+
- Descriptors, e.g. `@midnight`, `@every 1h30m` ...
710+
- See more: [cron decument](https://pkg.go.dev/github.com/gogs/[email protected])
711+
707712
### Basic cron tasks - enabled by default
708713

709714
#### Cron - Cleanup old repository archives (`cron.archive_cleanup`)

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ test01.xls: application/vnd.ms-excel; charset=binary
245245

246246
- `ENABLED`: 是否在后台运行定期任务。
247247
- `RUN_AT_START`: 是否启动时自动运行。
248+
- `SCHEDULE` 所接受的格式
249+
- 完整 crontab 控制, 例如 `* * * * * ?`
250+
- 描述符, 例如 `@midnight`, `@every 1h30m` ...
251+
- 更多细节参见 [cron api文档](https://pkg.go.dev/github.com/gogs/[email protected])
252+
248253

249254
### Cron - Update Mirrors (`cron.update_mirrors`)
250255

0 commit comments

Comments
 (0)