I'm using a cron that gets accesses a URL to run a scheduled process. I keep getting successful emails... is there a way for me to only get emails if the wget request fails?
wget http://www.domain.com/cron/dailyEmail 2>&1;
I'm using a cron that gets accesses a URL to run a scheduled process. I keep getting successful emails... is there a way for me to only get emails if the wget request fails?
wget http://www.domain.com/cron/dailyEmail 2>&1;
wget --quiet http://www.domain.com/cron/dailyEmail || echo "wget failed"
(Note that an empty response is not a failure.)