+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Cron Jobs

  1. #1
    fierce's Avatar
    fierce is offline x10 Sophmore fierce is an unknown quantity at this point
    Join Date
    Jul 2008
    Location
    Macedonia
    Posts
    222

    Cron Jobs

    I got problem with running the turn script on my game www.eraoferadication.co.cc .I entered this in the cron jobs "/fierce/local/bin/php turns.php" and made folder leading to the path .
    Pls some1 good @ cron jobs tell me what should I do ..

    Thx in Advance

    fierce .
    Last edited by fierce; 09-30-2008 at 04:14 PM.
    If my post has helped ya or ya like my jokes hit the +REP button ;)
    http://www.eraoferadication.co.cc

    HTML Code:
    http://forums.x10hosting.com/marketplace/85707-req-1000-credits-4-exchange.html

  2. #2
    Salvatos's Avatar
    Salvatos is offline x10 Lieutenant Salvatos is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Québec, Canada
    Posts
    271

    Re: Cron Jobs

    I'm not particularly "good at cron jobs" but I'm using this line for the very same purpose as you. Yours should be this:

    "php -q /home/fierce/local/bin/php turns.php"

    Except that a space in a file name is probably not a good idea, you may want to place an underscore "_" instead (unless you actually meant bin/php/turns.php).

    The -q prevents it from sending you an e-mail, you can remove it if your prefer.
    Last edited by Salvatos; 09-30-2008 at 05:16 PM.

  3. #3
    fierce's Avatar
    fierce is offline x10 Sophmore fierce is an unknown quantity at this point
    Join Date
    Jul 2008
    Location
    Macedonia
    Posts
    222

    Re: Cron Jobs

    I tried with both "php -q /home/fierce/local/bin/php turns.php" ,

    "php -q /home/fierce/local/bin/php_turns.php" ,

    "php -q /home/fierce/local/bin/php/turns.php" and without

    php - q and none

    of this works...now I gtg but l8rs will post more info 'bout the

    problem ..

    some1 with good xp in this stuff ..pls help me ..willing to give

    credits as well if some1 help me run the turn script .

    Thx in Advance

    fierce .
    If my post has helped ya or ya like my jokes hit the +REP button ;)
    http://www.eraoferadication.co.cc

    HTML Code:
    http://forums.x10hosting.com/marketplace/85707-req-1000-credits-4-exchange.html

  4. #4
    Salvatos's Avatar
    Salvatos is offline x10 Lieutenant Salvatos is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Québec, Canada
    Posts
    271

    Re: Cron Jobs

    Don't you get any error? If the cron job does not work, it's supposed to send you an error e-mail. If it doesn't, you should consider revising your script itself.

  5. #5
    fierce's Avatar
    fierce is offline x10 Sophmore fierce is an unknown quantity at this point
    Join Date
    Jul 2008
    Location
    Macedonia
    Posts
    222

    Re: Cron Jobs

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

    input file specified. - this is what I was getting when the command was

    /usr/local/bin/php turns.php ..now when I changed to

    /home/fierce/local/bin/php/turns.php ..I'm getting nothing ..I will send the

    user and the pass of my cPanel to some1 good with this to make it work

    and will give 100 credits if it successfull .

    fierce .
    If my post has helped ya or ya like my jokes hit the +REP button ;)
    http://www.eraoferadication.co.cc

    HTML Code:
    http://forums.x10hosting.com/marketplace/85707-req-1000-credits-4-exchange.html

  6. #6
    Scoochi2's Avatar
    Scoochi2 is offline x10 Sophmore Scoochi2 is an unknown quantity at this point
    Join Date
    Aug 2008
    Location
    Southport!
    Posts
    185

    Re: Cron Jobs

    I have cronjobs working perfectly for me.
    First of all, at the top of the script you want to run, make sure the first line (before ANYTHING, even a newline) is the following:
    Code:
    #!/usr/local/bin/php -q
    I admit that I'm not certain you need it, but it doesn't hurt anyway.
    Then, for the 'command to run' in the cronjobs section of the cpanel, make it something along the lines of the following:
    Code:
    php-cron /home/fierce/public_html/cron.php
    The above two things are exactly what I did, and it works perfectly
    If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:

  7. #7
    Salvatos's Avatar
    Salvatos is offline x10 Lieutenant Salvatos is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Québec, Canada
    Posts
    271

    Re: Cron Jobs

    Just for the record, I don't have the first line you mentioned, just usual PHP, and it works perfectly as well, so I'd say it doesn't seem to be crucial.

    And as someone once said to me, you probably don't want your cron job in a public directory, because anyone finding the url can activate the script by visiting the page (unless you password protect it, but I don't know if it can prevent the cron from accessing it as well so I haven't tried it).

  8. #8
    fierce's Avatar
    fierce is offline x10 Sophmore fierce is an unknown quantity at this point
    Join Date
    Jul 2008
    Location
    Macedonia
    Posts
    222

    Re: Cron Jobs

    ok Scoochi2 ..I'll send ya my cPanel user and pass via PM ..and pls look into it

    and fix it ..If it works you'll get 100 x10 credits .

    fierce .
    Edit:
    I'm increasing the prize up to 300 credits .
    Edit:
    I'd ask 4 some from the stuff to check if there might be an error in the cron

    jobs ..coz I tried lot of different ways of launching the turn script but none of

    them happens to work ..

    Thx in Advance
    Last edited by fierce; 10-03-2008 at 05:06 PM. Reason: Automerged Doublepost
    If my post has helped ya or ya like my jokes hit the +REP button ;)
    http://www.eraoferadication.co.cc

    HTML Code:
    http://forums.x10hosting.com/marketplace/85707-req-1000-credits-4-exchange.html

  9. #9
    Salvatos's Avatar
    Salvatos is offline x10 Lieutenant Salvatos is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Québec, Canada
    Posts
    271

    Re: Cron Jobs

    I'm not really comfortable with going into someone else's cPanel but I guess I could have a look during the weekend. But please check first with a moderator if it's allowed, because I think it is not and I don't want the both of us to get suspended...

  10. #10
    fierce's Avatar
    fierce is offline x10 Sophmore fierce is an unknown quantity at this point
    Join Date
    Jul 2008
    Location
    Macedonia
    Posts
    222

    Re: Cron Jobs

    I found the problem in the php not in the cron jobs ..so now it works ..thx 2

    every1 that tried to help me .I decided to give 30 credits all ppl that

    helped .

    Thx again

    fierce .
    If my post has helped ya or ya like my jokes hit the +REP button ;)
    http://www.eraoferadication.co.cc

    HTML Code:
    http://forums.x10hosting.com/marketplace/85707-req-1000-credits-4-exchange.html

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. CRON Jobs and PHP
    By deadimp in forum Tutorials
    Replies: 14
    Last Post: 11-27-2008, 05:09 PM
  2. Cron Tutorial (Crontab Tutorial)
    By sunils in forum Tutorials
    Replies: 3
    Last Post: 06-14-2008, 10:34 PM
  3. Cron Jobs and Facebook
    By dmallenby in forum Free Hosting
    Replies: 2
    Last Post: 11-14-2007, 10:04 AM
  4. Cron Jobs
    By stuffradio in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 11-12-2007, 07:01 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