1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

cron and wget

Discussion in 'PHP' started by jnm, Jul 30, 2007.

  1. #1
    maybe this is the wrong forum, but i am using a php cron script which works, but everytime it runs, it creates a copy of itself in the root folder (if it exists, it adds a new copy i.e. script.php, script1.php, script2.php...)

    is there something to add to this line so it won't make that copy?

    15 04 * * * wget http://www.domain.com/cjob.php
    Code (markup):

     
    jnm, Jul 30, 2007 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    It looks like the php script itself that it making the copy. Can you post the code of the php script?
     
    jestep, Jul 30, 2007 IP
  3. Vbot

    Vbot Peon

    Messages:
    107
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try:

    15 04 * * * wget --spider http://www.domain.com/cjob.php
    Code (markup):
    So it's only visit the url, but will not save it.
     
    Vbot, Jul 30, 2007 IP
  4. pruad

    pruad Peon

    Messages:
    71
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    
    15 04 * * * wget http://www.domain.com/cjob.php -O output.html
    
    Code (markup):
    This allways will put result in output.html
     
    pruad, Jul 30, 2007 IP