I have three problem, all of them are about crontab.
Can I access
$HOMEvariable in crontab ? for example, use$HOMElike this:PATH=$HOME/bin:$HOME/scripts:$PATH? or* * * * * echo "test" > $HOME/test.txt?I want let crontab redirect normal
stdoutto/dev/null, but mailstderrto user. For example, when computer is not connected to network, then an entry in crontab like* 2 * * * getmail -n -q ...will return error, so crontab will send email to user with this error.based on upper example,
getmailwill let crontab mail user when system is not connected to network, so I want a method to detect whether user is connected to network.
About this method of detecting, it should has bellowing:
fast
simple
easy to combine with other crontab jobs, (like use control: &&, ||, | etc)
