+ Reply to Thread
Results 1 to 9 of 9

Thread: Crons don't work

  1. #1
    megakilobit is offline x10Hosting Member megakilobit is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    2

    Crons don't work

    Hi,

    My cron just doesn't work. Here is the command line:
    Code:
    "/usr/bin/php /home/mkbit/www/ff_stats/analyse/analyse.php"
    And the result:
    Code:
    /bin/sh: /usr/bin/php /home/mkbit/www/ff_stats/analyse/analyse.php: No such file or directory
    WTF? Thx.

  2. #2
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: Crons don't work

    try using 'public_html' instead of 'www'
    then call 'php' instead of '/usr/bin/php'
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  3. #3
    megakilobit is offline x10Hosting Member megakilobit is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    2

    Re: Crons don't work

    It still doesn't work...

  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Crons don't work

    Code:
    /usr/local/bin/php   /home/mkbit/www/ff_stats/analyse/analyse.php
    Do not put in quotes.
    Make sure /ff_stats/analyse/analyse.php is the correct path.
    Try running it from yoursite.com/ff_stats/analyse/analyse.php
    Nothing is always absolutely so.

  5. #5
    xPlozion's Avatar
    xPlozion is offline x10 Elder xPlozion is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    Delaware, USA
    Posts
    872

    Re: Crons don't work

    actually, a few months back (don't know if it still applies today), but i was told by a staff member here to use php-cron instead of the standard php binary...

    so you would want to use
    Code:
    php-cron /home/mkbit/public_html/ff_stats/analyse/analyse.phpp
    ps, www is just a symlink to public_html, so to avoid any possible problems, go w/ the absolute (real) path...

  6. #6
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Crons don't work

    Which server are you on?

    If you get it to work, please post here what the problem was. Several people have had problems getting cron jobs to work, yet nobody seems to come back to explain how they got them to work (if they did instead of just giving up).
    Nothing is always absolutely so.

  7. #7
    alamar77 is offline x10Hosting Member alamar77 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    4

    Re: Crons don't work

    Hello, i have the same problem... cron don't work...

    my cron line is:

    */10 * * * 0,1,2,3,4,5 wget -O - http://www.mponline.org/xxxx/xxxx.php >> /home/alamar77/cronjobs/log2.log

    I don't receive any email, and no error message...:dunno:
    Last edited by alamar77; 11-13-2009 at 04:21 AM.

  8. #8
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Crons don't work

    Quote Originally Posted by alamar77 View Post
    Hello, i have the same problem...
    Actually, you don't. OP had extraneous quotes that caused the entire command line to be interpreted as a command name. Generally speaking, you should start a new thread unless you have the exact same problem and a thread doesn't include a resolution.

    Test the command line by itself; you'll need to do this somewhere you have shell access (such as your own system).

    Note you can specify a range of values using a hyphen:

    Code:
    */10 * * * 0-5 ...
    If you need more help, start a new thread.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  9. #9
    alamar77 is offline x10Hosting Member alamar77 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    4

    Re: Crons don't work

    Quote Originally Posted by misson View Post
    Actually, you don't. OP had extraneous quotes that caused the entire command line to be interpreted as a command name. Generally speaking, you should start a new thread unless you have the exact same problem and a thread doesn't include a resolution.

    Test the command line by itself; you'll need to do this somewhere you have shell access (such as your own system).

    Note you can specify a range of values using a hyphen:

    Code:
    */10 * * * 0-5 ...
    If you need more help, start a new thread.
    ok sorry... you are not able to help me, the line works perfectly on crontab on my pc... thanks... i start a new thread

+ Reply to Thread

Similar Threads

  1. Jealous See
    By ichwar in forum Computers & Technology
    Replies: 216
    Last Post: 09-08-2009, 09:59 AM
  2. Prison vs Work
    By John Klyne in forum Off Topic
    Replies: 10
    Last Post: 12-21-2008, 01:44 PM
  3. Minute Crons
    By fahimtm in forum Free Hosting
    Replies: 1
    Last Post: 10-28-2007, 09:14 AM
  4. index.html banner does'nt work
    By comecoco in forum Free Hosting
    Replies: 5
    Last Post: 09-26-2005, 04:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers