Please Help! Cron job failure

Discussion in 'Programming' started by verdecove, Oct 11, 2009.

  1. #1
    Hello,
    I'm trying since two days in vain to get a cron job running to update the inventory of an VM online store (updating the product database tables).
    The cron tab I'm using is this:
    /usr/bin/php /home/myaccountname/public_html/administrator/components/com_csvimproved/helpers/cron.php username="myusrname" passwd="mypasswd" template_name="mytemplatename" filename="/media/myfilename.ods"

    This is what the cron deamon sends me:

    LICENSE_KEY_NOKResults for /media/10_10_09_Update.ods
    ======================================
    Line:1
    Result:FAILURE
    Message incorrect :: Specified local file doesn't exist.
    File:/media/10_10_09_Update.ods FAILURE

    Folder "media" is in the folder public_html (fist level)
    I have tried pretty much every path combination I could think of to direct to the folder "media". Cron job always fails because Specified local file desn't exist. But I'm not that stupid and I know it does exist! LOL

    I am working with Joomla 1.5.14 Virtuemart 1.1.3 and CSV Improved 1.7
    and I'm hosting with HostGator.
    Have tried it with csv files and ods files since CSV Improved supports both file types. I even have tried to store the to be imported file in the same folder as the cron.php is stored in. In tha case the cron doesn't stat at all. at least I don't receive any response email from the cron deamon.

    What the heck am I doing wrong? Or if anybody has an idea in what other way to update the inventory. I can't do it from the backend of joomla using CSV Improved. the script takes too long to run and causes a server script execution time out.
    Please help!
    Thank you guys
    verdecove
     
    verdecove, Oct 11, 2009 IP
  2. EASYDOMAIN4ALL

    EASYDOMAIN4ALL Well-Known Member

    Messages:
    297
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    123
    #2
    I am assuming you are using the cron command like

    /usr/bin/php /home/myaccountname/public_html/administrator/components/com_csvimproved/helpers/cron.php username="myusrname" passwd="mypasswd" template_name="mytemplatename" filename="/media/myfilename.ods"

    as you have mentioned.

    Try this :

    /usr/bin/php /home/myaccountname/public_html/administrator/components/com_csvimproved/helpers/cron.php?username="myusrname"&passwd="mypasswd"&template_name="mytemplatename"&filename="/media/myfilename.ods"

    If your local file exist and everything otherthing ok, it should run.
     
    EASYDOMAIN4ALL, Oct 11, 2009 IP
  3. verdecove

    verdecove Member

    Messages:
    287
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    33
    #3
    Thank you for trying to help me but unfortunately it didn't work either.
     
    verdecove, Oct 12, 2009 IP
  4. phones2me

    phones2me Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    make sure you use the special cron editor

    cron files have to be formatted EXACTLY right
     
    phones2me, Oct 15, 2009 IP
  5. verdecove

    verdecove Member

    Messages:
    287
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    33
    #5
    I know that and my hoster provides a really nice way to set up a cron job and I even went through the cron tab with several of their support guys and we couldn't get it to work. It might be something about the php script the cron is support to run but the developer of that script hasn't gotten back with me yet.
    Meanwhile I found another temporary to solve the problem but I don't know for how long that will work.
    But anyway, thank you so much for your advice.
     
    verdecove, Oct 15, 2009 IP
  6. ohteddy

    ohteddy Member

    Messages:
    128
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #6
    Have you set your PATH correctly?

    i.e. crontab -e

    PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
    # m h dom mon dow command
    1 * * * * somecommand

    I would also make sure that those paths you're giving as parameters are not relative but absolute.
     
    ohteddy, Oct 15, 2009 IP
  7. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #7
    thuankkk, Oct 23, 2009 IP