<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>scripting Archives - Marc-Olivier Meunier</title>
	<atom:link href="https://momeunier.fr/tag/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>https://momeunier.fr/tag/scripting/</link>
	<description>Customer Engagement Leader // Ultra-distance cyclist</description>
	<lastBuildDate>Tue, 30 Nov -001 00:00:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.8</generator>

<image>
	<url>https://momeunier.fr/wp-content/uploads/2022/09/cropped-cropped-ma-pomme-32x32.jpeg</url>
	<title>scripting Archives - Marc-Olivier Meunier</title>
	<link>https://momeunier.fr/tag/scripting/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to make a script sleep for a random amount of seconds</title>
		<link>https://momeunier.fr/how-make-script-sleep-random-amount-seconds/</link>
					<comments>https://momeunier.fr/how-make-script-sleep-random-amount-seconds/#respond</comments>
		
		<dc:creator><![CDATA[Marc Olivier Meunier]]></dc:creator>
		<pubDate></pubDate>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripting]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> &#60; 1</span> <span class="rt-label rt-postfix">minute</span></span></p>
<p>If you want to insert a sleep in a script for a random number of seconds, you can do the following:</p>
<pre>&#160; &#160; &#160; &#160; NUMBER=$[ ( $RANDOM % 60 ) &#160;+ 1 ]</pre>
<pre>&#160; &#160; &#160; &#160; sleep $NUMBER</pre>
<p>Replace 60 with the interval chosen and you will get a random sleep between 1 and 60 seconds.</p>
<p>This can be useful if you are trying to fetch data from a server who's monitoring the number of connections you are opening and tends to blacklist you if you do too much.</p>
<p>The post <a href="https://momeunier.fr/how-make-script-sleep-random-amount-seconds/">How to make a script sleep for a random amount of seconds</a> appeared first on <a href="https://momeunier.fr">Marc-Olivier Meunier</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div id="bsf_rt_marker"></div><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> &lt; 1</span> <span class="rt-label rt-postfix">minute</span></span><p>If you want to insert a sleep in a script for a random number of seconds, you can do the following:</p>
<pre>&nbsp; &nbsp; &nbsp; &nbsp; NUMBER=$[ ( $RANDOM % 60 ) &nbsp;+ 1 ]</pre>
<pre>&nbsp; &nbsp; &nbsp; &nbsp; sleep $NUMBER</pre>
<p>Replace 60 with the interval chosen and you will get a random sleep between 1 and 60 seconds.</p>
<p>This can be useful if you are trying to fetch data from a server who&#8217;s monitoring the number of connections you are opening and tends to blacklist you if you do too much.</p>
<p>The post <a href="https://momeunier.fr/how-make-script-sleep-random-amount-seconds/">How to make a script sleep for a random amount of seconds</a> appeared first on <a href="https://momeunier.fr">Marc-Olivier Meunier</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://momeunier.fr/how-make-script-sleep-random-amount-seconds/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
