Custom cron jobs not running

Discussion in 'ISPConfig 3 Priority Support' started by pawan, Mar 10, 2016.

  1. pawan

    pawan Member

    The migration of the server seems to be alright.
    Only problem I am now facing is custom cronjob created for websites are not running.
    I have checked the cron.d folder the file for cron job created for vhosts are not running.
    Please suggest how can correct it.
    Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Are these cronjobs jailed?
     
  3. pawan

    pawan Member

    not sure? I don't know about it.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look into the cron file of this job in cron.d directory, at the beginning of the file you can see the shell that the cronjob runs under, is this /bin/bash or /bin/sh or something like jk_.....
     
  5. pawan

    pawan Member

    Hi Till
    It is SHELL='/bin/sh'
    is that what it should be?
     
  6. pawan

    pawan Member

    Hi Till my cronjob is still not running.
    kindly suggest what else I should check to make it work?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so it is a non jailed job, thats fine. I just needed to know that in case that the jails might have needed an update.

    Have you tried to restart the cron daemon?
    Are there any errors in the syslog file?
    Do the commands that the cronjob executes exist on the new server?
     
  8. pawan

    pawan Member

    1. pawan@server1:~$ sudo service cron restart
      cron stop/waiting
      cron start/running, process 17477
      pawan@server1:~$
    2. No There are no errors relating to vhost in syslog file.
    3. if BY command you mean cron jobs defined in ISPCONFIG - THEN yes. it is also there in cron.d folder.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    I mean if the commands r scripts, that you run as cron, are working correctly. It might be that a program that you call in your script is is not there in the new server.
     
  10. pawan

    pawan Member

    HI Till I have checked in the new server. I can run them manually, so that possibility is not there.
    Now what else could be the problem, as I am really stuck on this one.
    As FYI I can say that the backup for websites for database and webfolder is working fine.
     
    Last edited: Mar 12, 2016
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    That's indeed a bit strange, when the cron files of the cronjobs are there, then ispconfig has done its job properly. So the reason must be that cron does not read them from cron.d folder for some reason. When backups are running, then cron must be running generally. Did you try a reboot of the server?
     
  12. pawan

    pawan Member

    No I will do reboot now and update you.
     
  13. pawan

    pawan Member

    Hi Till
    I have rebooted the server.
    Also modified the cron job in ispconfig to run every 5 minutes.
    Restarted the service cron.
    But that also didn't help.
    Custom cron jobs are still not running.
     
  14. pawan

    pawan Member

    Just adding another info - in /var/log/ispconfig/cron.log I am getting these errors
    Code:
    Sat Mar 12 15:18:01 IST 2016 Failed loading /usr/lib/php5/20090626/xcache.so:  /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
    In Var/log/syslog
    I am getting these errors relating to cron job
    Mar 12 15:20:01 server1 CRON[14783]: Authentication failure
    Mar 12 15:20:01 server1 CRON[14784]: Authentication failure
    Mar 12 15:20:01 server1 CRON[14787]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
     
    Last edited: Mar 12, 2016
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Install xcache again, or remove the old xcache config file from /etc/php5/conf.d/

    Regarding crin log lines, the last line is from ispconfig, the two lines before might be a wget cronjob that is blocked by a .htaccess password protection.
     
  16. pawan

    pawan Member

    I am removed the xcache for /etc/php/conf.d/ as I am not using xcache as such.
    But the Cron doesn't seems to be working even now.
     
  17. pawan

    pawan Member

    I haven't set any .htaccess password protection and the cron jobs were running before migration to new server.
     
  18. pawan

    pawan Member

    Hi Till - sorry for all the troubles.
    Actually I have missed the vhosts entries to copy to /etc/shadow file and that was causing the problem. As soon as I copies those lines
    Cron Start working without any problem.
    Thanks.
     
    ztk.me likes this.

Share This Page