Other Commands

Sleep

In some cases, the server can block your requests if the digger tries to take data too aggressively. To avoid it, you can artificially reduce the intensity of requests using pauses. Pauses can has fixed duration, or random in a given interval. To do pauses you ened to use sleep command.

The command takes only one argument, the length of the pause in seconds. However, you can pass not only an integer value, but also the interval in which the random value for pause will be selected. For example, if you pass the value 20:40, a pause of random duration between 20 and 40 seconds (for example, 34 seconds) will be done.

Usage examples:

          # FIXED PAUSE WITH 3 SEC DURATION
- sleep: 3
          
          # RANDOM PAUSE BETWEEN 20 AND 40 SEC PERIOD
- sleep: 20:40
          

In the next chapter, you will learn how to programmatically stop the digger execution.