Find the answer to your Linux question:
Results 1 to 3 of 3
I have a script that works great from the command line. I run this: php vsp.php -l q3a-ut -p savestate 1 "ftp://8.12.16.171/q3/8.12.16.171:27960/q3ut4/ioUrTserver.log" and it works fine. I added it to ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Location
    Memphis, TN
    Posts
    65

    [SOLVED] Cron Job Help!!!

    I have a script that works great from the command line. I run this:

    php vsp.php -l q3a-ut -p savestate 1 "ftp://8.12.16.171/q3/8.12.16.171:27960/q3ut4/ioUrTserver.log"

    and it works fine.

    I added it to crontab like this to run every minute:

    * * * * * /var/www/vsp/php vsp.php -l q3a-ut -p savestate 1 "ftp://8.12.16.171/q3/8.12.16.171:27960/q3ut4/ioUrTserver.log"

    didn't work!

    Also tried:

    * * * * * /usr/local/bin/php -q /var/www/vsp/php vsp.php -l q3a-ut -p savestate 1 "ftp://8.12.16.171/q3/8.12.16.171:27960/q3ut4/ioUrTserver.log"

    Why does it work commandline, but not in cron?

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Exclamation

    Quote Originally Posted by wesley_morris2000 View Post
    I have a script that works great from the command line. I run this:

    php vsp.php -l q3a-ut -p savestate 1 "ftp://8.12.16.171/q3/8.12.16.171:27960/q3ut4/ioUrTserver.log"

    and it works fine.
    Looks like problem,i encountered few months back

    You said ,it's working from command line,first check which php is getting executed by running following command,

    which php

    Output of above command should give pathname of php working for you, use that path in crontab file.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  3. #3
    Just Joined!
    Join Date
    Jun 2008
    Location
    Memphis, TN
    Posts
    65
    Thanks for your help. I ended up getting it to work by using a bash script.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •