wummel / linkchecker

check links in web documents or full websites
http://wummel.github.io/linkchecker/
GNU General Public License v2.0
1.42k stars 234 forks source link

option to use linkchecker as a cron job #615

Closed lpirl closed 8 years ago

lpirl commented 9 years ago

An option like --cron would be useful that makes linkchecker output errors only - nothing but errors. That way, running it as a cron job, it would only trigger an email being sent when errors are found.

nkuttler commented 8 years ago

What do you mean? Linkchecker exits with 2 when a program error happens, 1 for bad links.

linkchecker || if [ $? == 2 ]; then echo 'programm error'; fi

lpirl commented 8 years ago

I am after a switch to completely suppress any output to at least one of stdout or stderr. The motivation is to avoid that e.g. cron sends emails when no errors occurred.

nkuttler commented 8 years ago

I think you want chronic, from moreutils?

lpirl commented 8 years ago

I do not want it in particular, no. But I sense there is little motivation to include this behavior. Fair enough. :)

(for everyone not willing to install a bunch of tools to get chronic; use out=linkchecker … 2>&1|| echo $out alternatively)