+ Reply to Thread
Results 1 to 10 of 10

Thread: Cron Jobs

  1. #1
    lordsatw is offline x10Hosting Member lordsatw is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    3

    Cron Jobs

    Am using

    php-cron /public_html/crons/cron24r.php

    php-cron /public_html/crons/cron30r.php

    every hour and it aint working?:dunno:

  2. #2
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Cron Jobs

    are you using the full path to your file and to php? Are you using a shebang in your php file or did you set up cron with the full php path?

    this guy explains it pretty well: http://bytes.com/groups/php/7002-cal...bang#post28578
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  3. #3
    lordsatw is offline x10Hosting Member lordsatw is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    3

    Re: Cron Jobs

    i got it on full path but still aint working please help me i suck at cron its my 1 time

    Status: 404 Not Found
    X-Powered-By: PHP/5.2.6
    Content-type: text/html

    No input file specified.

  4. #4
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Cron Jobs

    Using regular mode (not the unix style advanced mode) you should type in this command: /usr/local/bin/php /home/{cpanel user name}/{file you want to run} then set the frequency.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

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

    Re: Cron Jobs

    I have a question, do I need to put the <?php ?> tags when using the shebangs? if so, were do I put them?
    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

  6. #6
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Cron Jobs

    tags must go after shebangs. Shebangs must be absolutely first in the file.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

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

    Re: Cron Jobs

    Okay, Thanks
    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

  8. #8
    lordsatw is offline x10Hosting Member lordsatw is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    3

    Re: Cron Jobs

    Can i use http://www.page.com/cron.php as path?


    by the way am geting this error

    Warning: include(../includes/inc-setup.php): failed to open stream: No such file or directory in /home/lordsatw/public_html/cron/cron24r.php on line 4

    Warning: include(): Failed opening '../includes/inc-setup.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/lordsatw/public_html/cron/cron24r.php on line 4

    Fatal error: Call to a member function query() on a non-object in /home/lordsatw/public_html/cron/cron24r.php on line 6

    on my email
    Last edited by lordsatw; 06-06-2009 at 09:26 AM.

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

    Re: Cron Jobs

    these mean that there is an error. check if the files '/home/lordsatw/public_html/includes/inc-setup.php' and '/home/lordsatw/public_html/includes/inc-setup.php' exists.
    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

  10. #10
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Cron Jobs

    No, you cannot execute remote code. The file must be on the server. These errors are because you are using relative paths. It looks like all your included files are in the same folder, why don't you use set_include_path() http://us3.php.net/manual/en/functio...clude-path.php
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

+ Reply to Thread

Similar Threads

  1. CRON Jobs and PHP
    By deadimp in forum Tutorials
    Replies: 14
    Last Post: 11-27-2008, 05:09 PM
  2. Cron Jobs?
    By HackerzInc in forum Free Hosting
    Replies: 3
    Last Post: 10-17-2008, 03:29 AM
  3. Cron Jobs
    By HackerzInc in forum Free Hosting
    Replies: 1
    Last Post: 10-01-2008, 10:06 PM
  4. Cron Tutorial (Crontab Tutorial)
    By sunils in forum Tutorials
    Replies: 3
    Last Post: 06-14-2008, 10:34 PM
  5. cron jobs help
    By TarinC in forum Scripts & 3rd Party Apps
    Replies: 5
    Last Post: 09-19-2006, 03:45 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