[GH-ISSUE #89] Feature request: allow configuring starting hour for automation tasks #416

Closed
opened 2026-04-13 14:06:06 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @MakiseKurisu on GitHub (Sep 5, 2025).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/89

For tasks that are repeated at least daily, it will be beneficial to set the start time at off hour, to better utilize network bandwidth during low activity time.

Originally created by @MakiseKurisu on GitHub (Sep 5, 2025). Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/89 For tasks that are repeated at least daily, it will be beneficial to set the start time at off hour, to better utilize network bandwidth during low activity time.
GiteaMirror added the question label 2026-04-13 14:06:06 -05:00
Author
Owner

@Tailscale-VPS commented on GitHub (Sep 5, 2025):

@MakiseKurisu if your are talking about the mirroring , theres already options to set schedule time (in cron also)

Also if u are using docker for deployment. Then wait for the closure of https://github.com/RayLabsHQ/gitea-mirror/issues/72

<!-- gh-comment-id:3259252745 --> @Tailscale-VPS commented on GitHub (Sep 5, 2025): @MakiseKurisu if your are talking about the mirroring , theres already options to set schedule time (in cron also) Also if u are using docker for deployment. Then wait for the closure of https://github.com/RayLabsHQ/gitea-mirror/issues/72
Author
Owner

@arunavo4 commented on GitHub (Sep 7, 2025):

@MakiseKurisu great point about scheduling during off-peak hours for bandwidth optimization!

Actually, you can already do this using cron expressions in SCHEDULE_INTERVAL. I realize this might not be super obvious from the docs, so here's how:

# Run daily at 2 AM
SCHEDULE_INTERVAL="0 2 * * *"

# Run at 3:30 AM every day
SCHEDULE_INTERVAL="30 3 * * *"

# Run at midnight on weekdays only
SCHEDULE_INTERVAL="0 0 * * 1-5"

# Run every Sunday at 4 AM
SCHEDULE_INTERVAL="0 4 * * 0"

So if you want to mirror during low-traffic hours, just pick your preferred time. The format is standard cron: minute hour day month weekday.

For now though, the cron approach gives you full control - you can even do stuff like "every 6 hours starting at 2 AM" with "0 2,8,14,20 * * *".

<!-- gh-comment-id:3263705146 --> @arunavo4 commented on GitHub (Sep 7, 2025): @MakiseKurisu great point about scheduling during off-peak hours for bandwidth optimization! Actually, you can already do this using cron expressions in `SCHEDULE_INTERVAL`. I realize this might not be super obvious from the docs, so here's how: ```bash # Run daily at 2 AM SCHEDULE_INTERVAL="0 2 * * *" # Run at 3:30 AM every day SCHEDULE_INTERVAL="30 3 * * *" # Run at midnight on weekdays only SCHEDULE_INTERVAL="0 0 * * 1-5" # Run every Sunday at 4 AM SCHEDULE_INTERVAL="0 4 * * 0" ``` So if you want to mirror during low-traffic hours, just pick your preferred time. The format is standard cron: `minute hour day month weekday`. For now though, the cron approach gives you full control - you can even do stuff like "every 6 hours starting at 2 AM" with `"0 2,8,14,20 * * *"`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea-mirror#416