Nextcloud jobs haven't been executed

Discussion in 'Technical' started by Benedict, Jul 1, 2022.

  1. Benedict

    Benedict New Member HowtoForge Supporter

    I don't know which forum fits best, so I'll choose this one.

    I thought that my nextcloud configuration is correct, because all checks passed and that means no security and setup warnings.
    But then some background jobs issues came up. Something like "jobs haven't been executed since some time.". Obviously, just to create a cron job as 'webcron' in ISPConfig wasn't enough. So that's the problem.
    Now, my solution is to add the following line to a cron.sh (e.g. ../private/cron.sh)
    Code:
    /usr/bin/php8.0 --define apc.enable_cli=1 /var/www/nx123.yourdomain.com/web/cron.php
    and to call that script as full cron every five minutes, e.g.
    Code:
    /var/www/clients/clientX/webY/private/cron.sh
    Now nextcloud no longer complains.
    Do you have another or maybe a better solution?
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Why not select the AJAX option instead of cron?
     
  3. Benedict

    Benedict New Member HowtoForge Supporter

    Yes. Why not AJAX? Good question. It's the soft option? Line of least resistance? ;)
    I read the manual when I installed nextcloud. One point is that it is recommended. We're more than 5 users, everyone uses the Desktop client. These may not be convincing arguments, but I've also wondered why cron isn't working the way I thought it would. I don't have real evidence, why not using AJAX. You can.
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Just create a cronjob in ISPConfig that runs every minute with this command:
    Code:
    php -f /var/www/nx123.yourdomain.com/web/cron.php
    and you should be good.
     
  5. Benedict

    Benedict New Member HowtoForge Supporter

    I'll try again but I think that's why I posted here. A few or some hours later (next day) the warning should appear, see #1. Otherwise I will report.
    Thank you!
     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Enable logging for the cronjob, the logs will be in the private folder of that web domain. Then you can check if it runs and if so, if there are any errors.
     

Share This Page