1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2005
    Rep Power

    syntax error: redirection unexpected

    I need to run each 10 minutes on FreeBSD6.0 server (php 4.4.0, Apache/1.3.33, screen ) the following script via cron: */10 * * * * path/script > /dev/null > 2>&1

    I know that this cron works fine on other Unix and Linux clones OS, but I can not run it on FreeBSD 6.0 and get mail messages: syntax error: redirection unexpected

    I can run the script itself via telnet by path/script but can not run it via cron that described above.

    Could somebody explain what is wrong with cron sintax on FreeBSD 6.0 ?

    Thanks in advance,
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Back in the real world.
    Rep Power
    one ">" too many. Wouldn't work in other systems either.
    Originally Posted by Linux
    $ path/script > /dev/null > 2>&1
    -bash: syntax error near unexpected token `2'

IMN logo majestic logo threadwatch logo seochat tools logo