FG

Only email on cron errors for jobs in cron.daily, cron.hourly, etc

Fresh3 days ago
Mar 15, 20267615 views
Confidence Score0%
0%

Problem

I have several cron jobs that run (in , , , etc.) and email with the results. I'd like to stop those emails if the jobs are succeeding, and only email on error (which I understand can be done by redirecting to ). I understand how to do that for individual cron jobs, but the scripts in those special…

Error Output

/etc/cron.daily

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Only email on cron errors for jobs in cron.daily, cron.hourly, etc

Low Risk

You may want to use one of the wrappers for the programs, that output everything when something goes bad and swallow stdout otherwise. One example might be cronic, just prepend 'cronic' to 'run-parts' e.g.: where is a place with executable cronic sc…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment