It's possible set the cron.* values to special time? #5654

Closed
opened 2025-11-02 06:32:04 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @somera on GitHub (Jun 28, 2020).

  • Gitea version (or commit ref): 1.12.1
  • Git version: 2.20.1
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

My actual cron.update_mirrors configurations is:

; Update mirrors
[cron.update_mirrors]
SCHEDULE = @every 24h

But @every 24h depends when Gitea was started. It's possible to set this to special time? I will that the mirror update should only run at night.

Originally created by @somera on GitHub (Jun 28, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.12.1 - Git version: 2.20.1 - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description My actual cron.update_mirrors configurations is: ``` ; Update mirrors [cron.update_mirrors] SCHEDULE = @every 24h ``` But @every 24h depends when Gitea was started. It's possible to set this to special time? I will that the mirror update should only run at night.
GiteaMirror added the issue/needs-feedback label 2025-11-02 06:32:04 -06:00
Author
Owner

@zeripath commented on GitHub (Jul 1, 2020):

Yes. Just use normal Cron notation.

@zeripath commented on GitHub (Jul 1, 2020): Yes. Just use normal Cron notation.
Author
Owner

@somera commented on GitHub (Jul 1, 2020):

hm ... I changed it and restarted Gitea. But ...

image

Is just the info abou the next cron start wrong?

@somera commented on GitHub (Jul 1, 2020): hm ... I changed it and restarted Gitea. But ... ![image](https://user-images.githubusercontent.com/8334250/86251998-e9d75e80-bbb2-11ea-8a80-30198ae85d00.png) Is just the info abou the next cron start wrong?
Author
Owner

@somera commented on GitHub (Jul 11, 2020):

Yes. Just use normal Cron notation.

Can you give me some working example please?! It didn't work for me.

@somera commented on GitHub (Jul 11, 2020): > Yes. Just use normal Cron notation. Can you give me some working example please?! It didn't work for me.
Author
Owner

@lunny commented on GitHub (Jul 12, 2020):

We use https://github.com/gogs/cron which is a fork of github.com/robfig/cron and you can find the syntax https://godoc.org/github.com/robfig/cron .

@lunny commented on GitHub (Jul 12, 2020): We use https://github.com/gogs/cron which is a fork of github.com/robfig/cron and you can find the syntax https://godoc.org/github.com/robfig/cron .
Author
Owner

@somera commented on GitHub (Jul 12, 2020):

We use https://github.com/gogs/cron which is a fork of github.com/robfig/cron and you can find the syntax https://godoc.org/github.com/robfig/cron .

Thy. this is very helpful.

@somera commented on GitHub (Jul 12, 2020): > We use https://github.com/gogs/cron which is a fork of github.com/robfig/cron and you can find the syntax https://godoc.org/github.com/robfig/cron . Thy. this is very helpful.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5654