Feature request: allow configuring starting hour for automation tasks #45

Closed
opened 2026-10-05 01:37:15 +02:00 by adam · 2 comments
Owner

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.

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. <!-- github-sync-id:3388086588 -->
adam closed this issue 2026-10-05 01:37:15 +02:00
Author
Owner

@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

@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 <!-- github-comment-id:3259252745 -->
Author
Owner

@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 * * *".

@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 * * *"`. <!-- github-comment-id:3263705146 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/gitea-mirror#45