Problem with add cronjob in ISP

Discussion in 'Installation/Configuration' started by Poliman, Jan 30, 2018.

  1. Poliman

    Poliman Member

    I tried add cron jobs as admin (default) user:
    1. "/usr/bin/php https://klub-biosfera.pl/public/admin/cron.php ActivationEmail" but not working, in log file /var/www/clients/client11/web28/private/cron.log I have message "Could not open input file: https://klub-biosfera.pl/public/admin/cron.php".
    2. "/usr/bin/php /var/www/clients/client11/web28/web/public/admin/cron.php ActivationEmail", in log file (this same) I have message "Could not open input file: /var/www/clients/client11/web28/web/public/admin/cron.php"
    3. "/usr/bin/php /var/www/klub-biosfera.pl/web/public/admin/cron.php ActivationEmail", in log file I have message "Could not open input file: /var/www/klub-biosfera.pl/web/public/admin/cron.php"
    4. "/usr/bin/php [web_root]/public/admin/cron.php ActivationEmail", in log file nothing new added.
    5. "/usr/bin/php /web/public/admin/cron.php ActivationEmail", in log file nothing new added.

    No matter what I setup I have in file /etc/cron.d/ispc_chrooted_web28 (only path to cron.php changes):
    Code:
    MAILTO=''
    SHELL='/usr/sbin/jk_chrootsh'
    
    */2     *       *       *       *       web28   /usr/bin/php /var/www/klub-biosfera.pl/web/public/admin/cron.php ActivationEmail >>/private/cron.log 2>>/private/cron_error.log #klub-biosfera.pl
    Privileges of cron.php file:
    -rw-r--r-- 1 web28 client11 2036 May 10 2015 cron.php

    User, for who I set up these cron jobs has "Chrooted cron" (unfortunately this same for "Full cron") turned on. There is also checkbox "Log output". Where the output is logged?

    PS
    Executing as root in shell - working:
    Code:
    /usr/bin/php /var/www/klub-biosfera.pl/web/public/admin/cron.php Kamsoft
    
    - in log file on server I see changes.
    Executing above like a shell user biosfera_sh not work, does not give any error in console and does not give any logs.
    On old server with DirectAdmin was cronjob "php /home/biosoc/domains/klub-biosfera.pl/public_html/public/admin/cron.php ActivationEmail" and cron.php had this same privileges.
     
    Last edited: Jan 30, 2018

Share This Page