xref: /aosp_15_r20/external/curl/docs/cmdline-opts/max-time.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: max-time
5*6236dae4SAndroid Build Coastguard WorkerShort: m
6*6236dae4SAndroid Build Coastguard WorkerArg: <seconds>
7*6236dae4SAndroid Build Coastguard WorkerHelp: Maximum time allowed for transfer
8*6236dae4SAndroid Build Coastguard WorkerCategory: connection timeout
9*6236dae4SAndroid Build Coastguard WorkerAdded: 4.0
10*6236dae4SAndroid Build Coastguard WorkerMulti: single
11*6236dae4SAndroid Build Coastguard WorkerSee-also:
12*6236dae4SAndroid Build Coastguard Worker  - connect-timeout
13*6236dae4SAndroid Build Coastguard Worker  - retry-max-time
14*6236dae4SAndroid Build Coastguard WorkerExample:
15*6236dae4SAndroid Build Coastguard Worker  - --max-time 10 $URL
16*6236dae4SAndroid Build Coastguard Worker  - --max-time 2.92 $URL
17*6236dae4SAndroid Build Coastguard Worker---
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard Worker# `--max-time`
20*6236dae4SAndroid Build Coastguard Worker
21*6236dae4SAndroid Build Coastguard WorkerSet maximum time in seconds that you allow each transfer to take. Prevents
22*6236dae4SAndroid Build Coastguard Workeryour batch jobs from hanging for hours due to slow networks or links going
23*6236dae4SAndroid Build Coastguard Workerdown. This option accepts decimal values (added in 7.32.0).
24*6236dae4SAndroid Build Coastguard Worker
25*6236dae4SAndroid Build Coastguard WorkerIf you enable retrying the transfer (--retry) then the maximum time counter is
26*6236dae4SAndroid Build Coastguard Workerreset each time the transfer is retried. You can use --retry-max-time to limit
27*6236dae4SAndroid Build Coastguard Workerthe retry time.
28*6236dae4SAndroid Build Coastguard Worker
29*6236dae4SAndroid Build Coastguard WorkerThe decimal value needs to be provided using a dot (.) as decimal separator -
30*6236dae4SAndroid Build Coastguard Workernot the local version even if it might be using another separator.
31