cron not working

Discussion in 'ISPConfig 3 Priority Support' started by pawan, Nov 27, 2020.

Tags:
  1. pawan

    pawan Member HowtoForge Supporter

    I have added a cron like
    Code:
    [web_root]/yii queue/run
    but doesn't look like it is having any effect.
    How can I fix it.

    ISPCONFIG VERION - 3.2
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the generated cron file in /etc/cron.d/
     
  3. pawan

    pawan Member HowtoForge Supporter

    the name of the file is ispc_chrooted_web264
    and contents are:

    Code:
    MAILTO=''
    SHELL='/usr/sbin/jk_chrootsh'
    
    *       *       *       *       *       web264  /web/yii queue/run >>/private/cron.log 2>>/private/cron_error.log #juli.mywebsolutions.co.in
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    If you login as a chroot shell user and run "/web/yii queue/run" does the program run correctly?

    Does anything show up in /private/cron.log or /private/cron_error.log ?
     
  5. pawan

    pawan Member HowtoForge Supporter

    I used as
    Code:
    ./yii queue/run
    in the web folder, but that ssh user is for that particular web, but not chrooted.
    and it works fine.
    there is no cron.log or cron_error.log in private folder of that web user.
     
    Last edited: Nov 27, 2020
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    That's a good start. Your cronjob is running chroot, so you should test that 'yii' works inside the chroot environment, and add anything that's missing.

    Next you want to ensure that 'yii' works when your current working directory is not /web. So as the shell user, do something like "cd /tmp" and then run "/web/yii queue/run".

    Curious, I'd expect those to be there, even if empty. Is /web/yii executable? Perhaps cron (or jk_chrootsh?) tests if it executable and doesn't even run if not - though just guessing at this point. Do you see the cronjob fire in your logs? Eg. "grep -i cron /var/log/syslog | grep web264.
     

Share This Page