October 18th, 2011, 08:34 AM
Hi there. What does "> /dev/null 2>&1" do and does anyone have a good tutorial on cron so I can read up?
*/5 * * * * lynx -dump 'script.php' > /dev/null 2>&1
October 18th, 2011, 09:14 AM
It discards the output of the script. It's actually a feature of the shell, not CRON. > redirects the program's normal output, /dev/null is a special location that simply discards everything that is written to it, 2> redirects the program's error output, &1 means to redirect to the same location as normal output.
Comments on this post