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

    Join Date
    Aug 2005
    Posts
    19
    Rep Power
    0

    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,
    Roman
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    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