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 Help Needed!! Please...

Discussion in 'PHP' started by workingsmart, Mar 21, 2013.

  1. #1
    ok so I'm obviously doing something wrong - but I can't figure it out..... Any help is appreciated....!!


    00 1 * * 5 [ /tmp/cronrun/.lastupdate -nt /home/MYDIR/public_html/file.csv ] || ( curl http://domain.com/file.php?cron=2 ; touch /tmp/cronrun/.lastupdate )
    Code (markup):

    It keeps running but the csv hasn't changed since last run - what am I doing wrong?

    thanks!
     
    workingsmart, Mar 21, 2013 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    .lastupdate?

    Don't you need to call the PHP command line?

    something like this?
    /usr/bin/php /home/username/example.com/myscript.php
     
    EricBruggema, Mar 22, 2013 IP
  3. workingsmart

    workingsmart Well-Known Member

    Messages:
    411
    Likes Received:
    12
    Best Answers:
    9
    Trophy Points:
    120
    #3
    I don't know - hence why I need help...lol

    the cron works and executes the script as desired but it doesn't check to see if the file has changed. It just keeps running.
     
    workingsmart, Mar 22, 2013 IP
  4. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #4
    and what's the content of the script executed by the cronjob?
     
    EricBruggema, Mar 22, 2013 IP
  5. workingsmart

    workingsmart Well-Known Member

    Messages:
    411
    Likes Received:
    12
    Best Answers:
    9
    Trophy Points:
    120
    #5
    content of the script is irrelevant - the issue was the temp log - the script was working as it should.

    no worries now though as I figured out the issue and all is resolved.
     
    workingsmart, Mar 23, 2013 IP
  6. workingsmart

    workingsmart Well-Known Member

    Messages:
    411
    Likes Received:
    12
    Best Answers:
    9
    Trophy Points:
    120
    #6
    please close this thread! - Thanks DP
     
    workingsmart, Mar 23, 2013 IP