Re: redirecting output to /dev/null on cron not working!
louie miranda said:
> I have a script that is on a cron basis, It runs every hour.
> I have read a document that if you dont want any output.
> You can add >/dev/null 1>&2 to redirect it to /dev/null
> But i still received email about those output, is this syntax
> im trying to add on my cron for debian correct?
>
> /scripts/cron_inactivityalert.sh >/dev/null 1>&2
I would do
/scripts/cron_inactivity.sh 1>/dev/null 2>&1
or
/scripts/cron_inactivity.sh 1>/dev/null 2>/dev/null
not sure if yours is wrong, but if it's not working, it probably is,
never done it that way myself nor have I seen it done that way in
documents.
nate
Reply to: