cron not working

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

  1. pawan

    pawan Member

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

  2. till

    till Super Moderator Staff Member ISPConfig Developer

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

    pawan Member

    the name of the file is ispc_chrooted_web264
    and contents are:

    *       *       *       *       *       web264  /web/yii queue/run >>/private/cron.log 2>>/private/cron_error.log
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    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

    I used as
    ./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 Well-Known Member Staff Member Howtoforge Staff

    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