From 045ad3fd8ca7c66ff8cdeddeb12bc5592beccdf8 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 25 Feb 2025 20:13:15 +0000 Subject: [PATCH] Add missing cron items content (#174) Reviewed-on: https://gitea.com/gitea/docs/pulls/174 --- docs/administration/config-cheat-sheet.md | 24 +++++++++++-- .../administration/config-cheat-sheet.md | 21 ++++++++++- .../administration/config-cheat-sheet.md | 36 ++++++++++--------- 3 files changed, 61 insertions(+), 20 deletions(-) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index abd93643..b170f83e 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -40,7 +40,7 @@ generate Gitea's `app.ini` from environment variables. ## Default Internal Variables (non-`app.ini` configuration) These values are environment-dependent but form the basis of a lot of values. They will be -reported as part of the default configuration when running `gitea help` or on start-up. +reported as part of the default configuration when running `gitea help` or on start-up. The order they are emitted there is slightly different but we will list them here in the order they are set-up. - _`AppPath`_: This is the absolute path of the running gitea binary. @@ -979,7 +979,6 @@ Default templates for project board view: - `ENABLED`: **false**: Enable to run all cron tasks periodically with default settings. - `RUN_AT_START`: **false**: Run cron tasks at application start-up. - `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices. - - `SCHEDULE` accept formats - Full crontab specs, e.g. `* * * * * ?` - Descriptors, e.g. `@midnight`, `@every 1h30m` ... @@ -991,25 +990,34 @@ Default templates for project board view: - `ENABLED`: **true**: Enable service. - `RUN_AT_START`: **true**: Run tasks at start up time (if ENABLED). +- `NOTICE_ON_SUCCESS`: **false**: Whether to emit notice on successful execution too - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`. - `OLDER_THAN`: **24h**: Archives created more than `OLDER_THAN` ago are subject to deletion, e.g. `12h`. #### Cron - Update Mirrors (`cron.update_mirrors`) +- `ENABLED`: **true**: Enable running Update mirrors task periodically. - `SCHEDULE`: **@every 10m**: Cron syntax for scheduling update mirrors, e.g. `@every 3h`. +- `RUN_AT_START`: **false**: Run Update mirrors task when Gitea starts. +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `PULL_LIMIT`: **50**: Limit the number of mirrors added to the queue to this number (negative values mean no limit, 0 will result in no mirrors being queued effectively disabling pull mirror updating). - `PUSH_LIMIT`: **50**: Limit the number of mirrors added to the queue to this number (negative values mean no limit, 0 will result in no mirrors being queued effectively disabling push mirror updating). #### Cron - Repository Health Check (`cron.repo_health_check`) +- `ENABLED`: **true**: Enable running Update mirrors task periodically. - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository health check. +- `RUN_AT_START`: **false**: Run Update mirrors task when Gitea starts. +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `TIMEOUT`: **60s**: Time duration syntax for health check execution timeout. - `ARGS`: **_empty_**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck #### Cron - Repository Statistics Check (`cron.check_repo_stats`) -- `RUN_AT_START`: **true**: Run repository statistics check at start time. - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository statistics check. +- `ENABLED`: **true**: Enable running Update mirrors task periodically. +- `RUN_AT_START`: **true**: Run Update mirrors task when Gitea starts. +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success #### Cron - Cleanup hook_task Table (`cron.cleanup_hook_task_table`) @@ -1030,10 +1038,20 @@ Default templates for project board view: #### Cron - Update Migration Poster ID (`cron.update_migration_poster_id`) +Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts. + +- `ENABLED`: **true**: Enable update migration poster id job. +- `RUN_AT_START`: **true**: Update migrated repositories' issues and comments' posterid when starting server +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `SCHEDULE`: **@midnight** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. #### Cron - Sync External Users (`cron.sync_external_users`) +Synchronize external user data (only LDAP user synchronization is supported) + +- `ENABLED`: **true**: Enable synchronize external user data job +- `RUN_AT_START`: **false**: Synchronize external user data when starting server +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `SCHEDULE`: **@midnight** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. - `UPDATE_EXISTING`: **true**: Create new users, update existing user data and disable users that are not in external source anymore (default) or only create new users if UPDATE_EXISTING is set to false. diff --git a/versioned_docs/version-1.22/administration/config-cheat-sheet.md b/versioned_docs/version-1.22/administration/config-cheat-sheet.md index aadb7f99..de9f89f5 100644 --- a/versioned_docs/version-1.22/administration/config-cheat-sheet.md +++ b/versioned_docs/version-1.22/administration/config-cheat-sheet.md @@ -933,25 +933,34 @@ Default templates for project boards: - `ENABLED`: **true**: Enable service. - `RUN_AT_START`: **true**: Run tasks at start up time (if ENABLED). +- `NOTICE_ON_SUCCESS`: **false**: Whether to emit notice on successful execution too - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`. - `OLDER_THAN`: **24h**: Archives created more than `OLDER_THAN` ago are subject to deletion, e.g. `12h`. #### Cron - Update Mirrors (`cron.update_mirrors`) +- `ENABLED`: **true**: Enable running Update mirrors task periodically. - `SCHEDULE`: **@every 10m**: Cron syntax for scheduling update mirrors, e.g. `@every 3h`. +- `RUN_AT_START`: **false**: Run Update mirrors task when Gitea starts. +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `PULL_LIMIT`: **50**: Limit the number of mirrors added to the queue to this number (negative values mean no limit, 0 will result in no mirrors being queued effectively disabling pull mirror updating). - `PUSH_LIMIT`: **50**: Limit the number of mirrors added to the queue to this number (negative values mean no limit, 0 will result in no mirrors being queued effectively disabling push mirror updating). #### Cron - Repository Health Check (`cron.repo_health_check`) +- `ENABLED`: **true**: Enable running Update mirrors task periodically. - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository health check. +- `RUN_AT_START`: **false**: Run Update mirrors task when Gitea starts. +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `TIMEOUT`: **60s**: Time duration syntax for health check execution timeout. - `ARGS`: **_empty_**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck #### Cron - Repository Statistics Check (`cron.check_repo_stats`) -- `RUN_AT_START`: **true**: Run repository statistics check at start time. - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository statistics check. +- `ENABLED`: **true**: Enable running Update mirrors task periodically. +- `RUN_AT_START`: **true**: Run Update mirrors task when Gitea starts. +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success #### Cron - Cleanup hook_task Table (`cron.cleanup_hook_task_table`) @@ -972,10 +981,20 @@ Default templates for project boards: #### Cron - Update Migration Poster ID (`cron.update_migration_poster_id`) +Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts. + +- `ENABLED`: **true**: Enable update migration poster id job. +- `RUN_AT_START`: **true**: Update migrated repositories' issues and comments' posterid when starting server +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `SCHEDULE`: **@midnight** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. #### Cron - Sync External Users (`cron.sync_external_users`) +Synchronize external user data (only LDAP user synchronization is supported) + +- `ENABLED`: **true**: Enable synchronize external user data job +- `RUN_AT_START`: **false**: Synchronize external user data when starting server +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `SCHEDULE`: **@midnight** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. - `UPDATE_EXISTING`: **true**: Create new users, update existing user data and disable users that are not in external source anymore (default) or only create new users if UPDATE_EXISTING is set to false. diff --git a/versioned_docs/version-1.23/administration/config-cheat-sheet.md b/versioned_docs/version-1.23/administration/config-cheat-sheet.md index 63edcbbb..b631777c 100644 --- a/versioned_docs/version-1.23/administration/config-cheat-sheet.md +++ b/versioned_docs/version-1.23/administration/config-cheat-sheet.md @@ -967,7 +967,6 @@ Default templates for project board view: - `ENABLED`: **false**: Enable to run all cron tasks periodically with default settings. - `RUN_AT_START`: **false**: Run cron tasks at application start-up. - `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices. - - `SCHEDULE` accept formats - Full crontab specs, e.g. `* * * * * ?` - Descriptors, e.g. `@midnight`, `@every 1h30m` ... @@ -979,25 +978,34 @@ Default templates for project board view: - `ENABLED`: **true**: Enable service. - `RUN_AT_START`: **true**: Run tasks at start up time (if ENABLED). +- `NOTICE_ON_SUCCESS`: **false**: Whether to emit notice on successful execution too - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`. - `OLDER_THAN`: **24h**: Archives created more than `OLDER_THAN` ago are subject to deletion, e.g. `12h`. #### Cron - Update Mirrors (`cron.update_mirrors`) +- `ENABLED`: **true**: Enable running Update mirrors task periodically. - `SCHEDULE`: **@every 10m**: Cron syntax for scheduling update mirrors, e.g. `@every 3h`. +- `RUN_AT_START`: **false**: Run Update mirrors task when Gitea starts. +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `PULL_LIMIT`: **50**: Limit the number of mirrors added to the queue to this number (negative values mean no limit, 0 will result in no mirrors being queued effectively disabling pull mirror updating). - `PUSH_LIMIT`: **50**: Limit the number of mirrors added to the queue to this number (negative values mean no limit, 0 will result in no mirrors being queued effectively disabling push mirror updating). #### Cron - Repository Health Check (`cron.repo_health_check`) +- `ENABLED`: **true**: Enable running Update mirrors task periodically. - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository health check. +- `RUN_AT_START`: **false**: Run Update mirrors task when Gitea starts. +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `TIMEOUT`: **60s**: Time duration syntax for health check execution timeout. - `ARGS`: **_empty_**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck #### Cron - Repository Statistics Check (`cron.check_repo_stats`) -- `RUN_AT_START`: **true**: Run repository statistics check at start time. - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository statistics check. +- `ENABLED`: **true**: Enable running Update mirrors task periodically. +- `RUN_AT_START`: **true**: Run Update mirrors task when Gitea starts. +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success #### Cron - Cleanup hook_task Table (`cron.cleanup_hook_task_table`) @@ -1018,27 +1026,23 @@ Default templates for project board view: #### Cron - Update Migration Poster ID (`cron.update_migration_poster_id`) +Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts. + +- `ENABLED`: **true**: Enable update migration poster id job. +- `RUN_AT_START`: **true**: Update migrated repositories' issues and comments' posterid when starting server +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `SCHEDULE`: **@midnight** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. #### Cron - Sync External Users (`cron.sync_external_users`) +Synchronize external user data (only LDAP user synchronization is supported) + +- `ENABLED`: **true**: Enable synchronize external user data job +- `RUN_AT_START`: **false**: Synchronize external user data when starting server +- `NOTICE_ON_SUCCESS`: **false**: Notice if not success - `SCHEDULE`: **@midnight** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. - `UPDATE_EXISTING`: **true**: Create new users, update existing user data and disable users that are not in external source anymore (default) or only create new users if UPDATE_EXISTING is set to false. -#### Cron - Cleanup Expired Actions Assets (`cron.cleanup_actions`) - -- `ENABLED`: **true**: Enable cleanup expired actions assets job. -- `RUN_AT_START`: **true**: Run job at start time (if ENABLED). -- `SCHEDULE`: **@midnight** : Cron syntax for the job. - -#### Cron - Cleanup Deleted Branches (`cron.deleted_branches_cleanup`) - -- `ENABLED`: **true**: Enable deleted branches cleanup. -- `RUN_AT_START`: **true**: Run job at start time (if ENABLED). -- `NOTICE_ON_SUCCESS`: **false**: Set to true to log a success message. -- `SCHEDULE`: **@midnight**: Cron syntax for scheduling deleted branches cleanup. -- `OLDER_THAN`: **24h**: Branches deleted OLDER_THAN ago will be cleaned up. - ### Extended cron tasks #### Cron - Delete all repository archives (`cron.delete_repo_archives`)