SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot karnetics's Avatar
    Join Date
    Dec 2004
    Location
    USA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cron Job Problems!! HELP!!

    I have setup the following cron job but have a problem.

    Here is my setup
    */2 **** /home/karnar/www/counter/count_down.php>

    I get the following error
    /bin/sh: -c: line 0: syntax error near unexpected token `newline'
    /bin/sh: -c: line 0: `/home/karnetic/www/counter/count_down.php>

    Can anyone help a cron newbie

  2. #2
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Quote Originally Posted by karnetics
    I have setup the following cron job but have a problem.

    Here is my setup
    */2 **** /home/karnar/www/counter/count_down.php>

    I get the following error
    /bin/sh: -c: line 0: syntax error near unexpected token `newline'
    /bin/sh: -c: line 0: `/home/karnetic/www/counter/count_down.php>

    Can anyone help a cron newbie
    you've the time right(every 2 minutes it is to be run, right) & the path to the file, but what are you trying to do with the cron?
    should be something like
    Code:
    */2 **** php> /home/karnar/www/counter/count_down.php
    or
    Code:
    */2 **** /usr/local/bin/php /home/karnar/www/counter/count_down.php
    I'd suggest that you ask your host about how you can execute a PHP file via cron, since he'll be the best person to ask, as there's no general standardised syntax for it & its implemented in a different way on different hosts' servers.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  3. #3
    SitePoint Zealot karnetics's Avatar
    Join Date
    Dec 2004
    Location
    USA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by asp_funda
    you've the time right(every 2 minutes it is to be run, right) & the path to the file, but what are you trying to do with the cron?
    should be something like
    Code:
    */2 **** php> /home/karnar/www/counter/count_down.php
    or
    Code:
    */2 **** /usr/local/bin/php /home/karnar/www/counter/count_down.php
    I'd suggest that you ask your host about how you can execute a PHP file via cron, since he'll be the best person to ask, as there's no general standardised syntax for it & its implemented in a different way on different hosts' servers.
    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •