1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

my cron jobs don't work

Discussion in 'Plesk for Linux - 8.x and Older' started by jospBln, Feb 24, 2006.

  1. jospBln

    jospBln New Pleskian

    23
     
    Joined:
    Dec 3, 2004
    Messages:
    17
    Likes Received:
    0
    hello,

    I have set up some php cron jobs:
    Min = 1
    H = *
    DM = *
    M = *
    DW = *

    /usr/local/psa/admin/bin/php /home/httpd/vhosts/domain/httpdocs/cron.php

    When I run this command as root, it works. But as a cron it doesn't.

    cron.php has 777
    All paths in cron.php are full, not relative.

    Where could be the problem?
    As which user runs plesk the script?
    How can I test it?

    best regards
    josp
     
  2. jospBln

    jospBln New Pleskian

    23
     
    Joined:
    Dec 3, 2004
    Messages:
    17
    Likes Received:
    0
    Got it,

    it should be
    /usr/bin/php /home/httpd/vhosts/domain/httpdocs/cron.php

    josp
     
  3. RajpalM

    RajpalM Guest

    0
     
    I am using
    /usr/bin/php /var/www/vhosts/prplettingagents.co.uk/httpdocs/admin/test.php
    But it's not working
    Giving error -: /usr/bin/php: No such file or directory
    My php info file is http://prplettingagents.co.uk/admin/test.php
    Plesk version 10.2.0
     
  4. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    login as root, and run

    which php

    that will show you the path to use for php.

    In your cron jobs call it like

    /path/php -f /path/to/file.php
     
Loading...