Silent Curl in CRON jobs

I have lots of CRON jobs. Some of them are just to probe our services to make sure they are alive, some download third party data via curl. Either way curl gets used in a fair number of them.

When a job produces output it will email the primary cron email contact. This becomes noisy and hard to really tell, what is wrong and what is not, and when failures occur.

To get curl to suppress it’s messages pass the -s option, then either set the output file parameter, or pipe the STDOUT output to /dev/null to get it to quiet down, but still produce STDERR output to the cron email contact.

if these flags don’t help you, check out the man page for your version of curl, I’d search for silent, and output to see what is new and changed.

 
1
Kudos
 
1
Kudos

Now read this

You should listen to 99% Invisible

You should listen to podcasts. Yes you. Get out of the pandora/spotify bubble of listening to only the same few things and get some variety in your commute and day. You don’t have to only listen to them, but it’s a default app on an... Continue →