How to stop aria2 download after a certain time

This article provides a direct answer to stopping an aria2 download automatically after a specific duration has passed. You will learn the exact command-line parameter required, its proper syntax, and practical examples to implement this time-limit feature in your download workflows.

The specific command parameter that allows aria2 to stop downloading after a certain amount of time has elapsed is --stop. This parameter accepts a relative time value, telling the aria2 process to terminate completely once that specified duration has reached zero.

The --stop Parameter Syntax

When using this parameter, you define the time limit using a number followed by a unit identifier. The supported time units are:

Practical Examples

If you want to limit a download to exactly 30 minutes, you would append the parameter to your command like this:

aria2c --stop=30m "https://example.com/largefile.zip"

For a strict time limit of 2 hours, the command structure looks like this:

aria2c --stop=2h "https://example.com/movie.mp4"

Key Considerations