Cron stopped working

Discussion in 'Installation/Configuration' started by backofficegeorgia, Sep 21, 2018.

  1. backofficegeorgia

    backofficegeorgia New Member

    cron jobs has just stopped working, i do not recall any system changes.

    * * * * * web3 wget -q -O- http:// >>/private/cron.log 2>>/private/cron_error.log
    There is no error log in /private/ folder.

    Thu Sep 20 04:29:01 +04 2018 20.09.2018-02:29 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    Thu Sep 20 04:29:01 +04 2018 20.09.2018-02:29 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

    i checked the dir and .ispconfig_lock is not there.

    I searched all the pages on google and almost all of them on this forum but was not able to find any solution to my issue. i am truly looking forward for your support.
  2. backofficegeorgia

    backofficegeorgia New Member

    very strange. i removed wget -q -O- part and left only link http:// and all works fine again.
    there are two things:
    1)before it worked with wget -q -O-
    2)wget -q -O- http:// works fine in SSH console. there are no errors and script get executed.
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Have you set PATH in your cron script or settings? Usually PATH has to be set so it contains the commands used, or use pathnames for commands, like /usr/bin/wget .
  4. backofficegeorgia

    backofficegeorgia New Member

    Thank you for your kind response. so basically you mean that:
    in ispconfig -> Sites - > Cron job instead of:
    wget -q -O- http://
    i should do:
    /usr/bin/wget -q -O- http://

    in case if above is correct, it still is not working.
    i even tried

    /var/www/clients/client1/web3/usr/bin/wget -q -O- (same problem)

    and again what is most impotent all three commands work fine when i execute them using SSH

    I am using bellow build:
    Last edited: Sep 22, 2018
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Maybe it is supposed to work that way. Manual says in chapter Cron Jobs that
  6. backofficegeorgia

    backofficegeorgia New Member

    It should and was running as wget -q -O- http:// suddenly same days back it stopped.
    i am not pro but i think that since it works from SSH it should work from ISPConfig as well and it looks like an issue of ISPConfig.
    and reference to ISPConfig issue it is not global cron issue since cron works just fine without wget -q -O- / It looks like there is something wrong with ISPConfig using wget.

    but again i am not pro, it is just my opinion based on above factors.
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    There is nothing wrong with cronjobs in ISPConfig, you just entered something wrong into the command field. For an URL cron, all you have to do is to enter the URL into the command field. So the whole command is simple:

    That's all. No wget or other programs need to be called here. And when you want to write a command manually (which I don't recommend as it might lead to the mistakes you made), then you have to use the full paths for commands as cron does not has a PATH variable set, so entering just wget .... must fail as a cronjob while it will work on the shell.
  8. backofficegeorgia

    backofficegeorgia New Member

    again having problem with cron on same url. it is configured as advised above.
    i checked logs /var/log/cron and bellow code gets executed every minute, which looks just fine!:
    Mar 13 15:34:01 vmi202549 CROND[30762]: (web1) CMD (/usr/bin/wget --no-check-certificate --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -q -t 1 -T 7200 -O /dev/null '' >/dev/null 2>&1
    i have pasted above code in ssh and all the queued processes got executed.

Share This Page