Error Background Settings / Cron Job not work

Hello, I have the problem that my background job does not seem to be working. What do I have to do to fix this error? What more information do you need from me?

Let’s start with this:

1 Like

Have you created a cron.sh script for it to call. i use a

#!/bin/sh
echo "Running Nextcloud cron job at $(date)" >> /home/turtle/compose/nextcloud/nextcloud-cron.log
docker exec -u www-data nextcloud php -f /var/www/html/cron.php

This will output that the cron job has finnished and working(This is not needed i just wanted it). The last part is executing the script.
i use docker so i had to mount it and all that stuff. What i did:

  cron:
    image: nextcloud:29.0.4-apache
    container_name: nextcloud-cron
    entrypoint: ["/bin/sh", "-c", "while true; do php -f /var/www/html/cron.php; sleep 300; done"]
    volumes:
      - /YOURDATADIR:/var/www/html
    depends_on:
      - nextcloud
    networks:
      - backend

The script will go every 300 seconds.
And also it helps alot if you do as @j-ed says becouse it gives us more info becouse i dont know what platform or anything about your setup, i need that info to help you correctly!

Well, that’s certainly a nice tutorial/explanation, but we don’t even know if @tomg1970 is using docker, or a manual installation, or an installation via distro packages, or AIO, or the snap, or some 3rd party docker image. We literally know nothing, except that the background jobs have not been working for 3 months :wink:

Exactly, if you look at the end of my comment @bb77 You will see me requesting more info. @tomg1970 please provide more info please. Thank you.

The question has been raised by @tomg1970 not me :wink:

Yes, but without information, there’s a good chance it’s a wasted effort.

Besides, by the time I reached the end of your post, I would already be wondering why the docker command doesn’t work on my manual installation. Just kidding, but I think you get my point… :wink:

First off, you got a point. Second off, you got a point. Also @j-ed Sorry for @ you grave mistake there i see.
Also @bb77 Im not answer a ton of questions at the moment so i just gave my fix, but i see your point, my bad.

1 Like