1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

fs: Allow semicolons as well as spaces in --bwlimit timetable parsing - fixes #7595

This commit is contained in:
Kyle Reynolds
2024-07-17 04:04:01 -06:00
committed by GitHub
parent 471531eb6a
commit d4b29fef92
4 changed files with 65 additions and 3 deletions

View File

@@ -724,12 +724,20 @@ for upload:download, e.g.`10M:1M`.
characters. It is optional.
- `HH:MM` is an hour from 00:00 to 23:59.
Entries can be separated by spaces or semicolons.
**Note:** Semicolons can be used as separators instead of spaces to avoid parsing issues in environments like Docker.
An example of a typical timetable to avoid link saturation during daytime
working hours could be:
Using spaces as separators:
`--bwlimit "08:00,512k 12:00,10M 13:00,512k 18:00,30M 23:00,off"`
In this example, the transfer bandwidth will be set to 512 KiB/s
Using semicolons as separators:
`--bwlimit "08:00,512k;12:00,10M;13:00,512k;18:00,30M;23:00,off"`
In these examples, the transfer bandwidth will be set to 512 KiB/s
at 8am every day. At noon, it will rise to 10 MiB/s, and drop back
to 512 KiB/sec at 1pm. At 6pm, the bandwidth limit will be set to
30 MiB/s, and at 11pm it will be completely disabled (full speed).
@@ -737,8 +745,12 @@ Anything between 11pm and 8am will remain unlimited.
An example of timetable with `WEEKDAY` could be:
Using spaces as separators:
`--bwlimit "Mon-00:00,512 Fri-23:59,10M Sat-10:00,1M Sun-20:00,off"`
Using semicolons as separators:
`--bwlimit "Mon-00:00,512;Fri-23:59,10M;Sat-10:00,1M;Sun-20:00,off"`
It means that, the transfer bandwidth will be set to 512 KiB/s on
Monday. It will rise to 10 MiB/s before the end of Friday. At 10:00
on Saturday it will be set to 1 MiB/s. From 20:00 on Sunday it will