I recently see a good deal from Staples for a Dell monitor – it’s 50% off , unfortunately it’s out of stock very soon. I can’t visit it everyday, so let do some funny stuff , writing a simple command to alert me when it’s in stock again.
Here is what it comes with
curl -s -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" https://www.staples.com/dell-24-led-montior-hdmi-2-x-watt-speakers-1920-x-1080-s2419h/product_24330114 | grep "This item is out of stock for delivery" || echo "https://www.staples.com/dell-24-led-montior-hdmi-2-x-watt-speakers-1920-x-1080-s2419h/product_24330114" | mail -a "From: [email protected]" -s "Staples:Dell S2419H 24 LED Monitor is available" [email protected]
#this is my cronjob
1 * * * * curl -s -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" https://www.staples.com/dell-24-led-montior-hdmi-2-x-watt-speakers-1920-x-1080-s2419h/product_24330114 | grep "This item is out of stock for delivery" || echo "https://www.staples.com/dell-24-led-montior-hdmi-2-x-watt-speakers-1920-x-1080-s2419h/product_24330114" | mail -a "From: [email protected]" -s "Staples:Dell S2419H 24 LED Monitor is available" [email protected]
Hope it works.