January 23, 20233 yr I don't know the programming language to get under the hood so all this "docker exec -i Nextcloud sudo -u root php -f" is lost on me but I'm learning, I figured -u is user. I have searched the forum and the web but all I get is more confused. I have nextcloud installed and running but I can't figure out CRON in nextcloud, it says CRON recommended Use system cron service to call the cron.php file every 5 minutes. Recommended for all instances. The cron.php needs to be executed by the system user "www-data". my nextcloud cron.php file is in location "/mnt/user/appdata/nextcloud/html/cron.php" but how do I run the file? I tried with User Scripts #!/bin/bash docker exec -i Nextcloud sudo -u root php -f /mnt/user/appdata/nextcloud/html/cron.php but this did nothing and I see crontab on websites, I did find it on terminal "crontab -e" but not sure what to type in and any thing I try I try is just a stab in the dark, I can't even get it to save or run. Could someone please help.
July 3, 20242 yr Sorry to resurect this post. But I'm struggeling with this as well. I need to get a CRON to fire every 5 minutes (for my Nextcloud installation). I installed the User Scripts plugin and added the script. I was excepting Nextcloud to run the script now but it doesn't seem to do that. The script is located here /boot/config/plugins/user.scripts/scripts/nextcloud but it doesn't seem to get executed automatically. Thanks for any idea how to fix this.
July 3, 20242 yr Community Expert 33 minutes ago, quicky said: Sorry to resurect this post. But I'm struggeling with this as well. I need to get a CRON to fire every 5 minutes (for my Nextcloud installation). I installed the User Scripts plugin and added the script. I was excepting Nextcloud to run the script now but it doesn't seem to do that. The script is located here /boot/config/plugins/user.scripts/scripts/nextcloud but it doesn't seem to get executed automatically. Thanks for any idea how to fix this. I expect the problem might be that the script on the boot drive is not set to be executable (and cannot be set to this). If User Scripts is running this rather than NextCloud it should take care of that for you. If this is the case any reason you have not simply set User Scripts to run it every 5 minutes?
July 3, 20242 yr 3 hours ago, itimpi said: If this is the case any reason you have not simply set User Scripts to run it every 5 minutes? Fair point. I guess there was a guide which said that it's recommended to set Nextcloud to CRON (which runs every 5 minutes) and then install the "User Scripts" plugin and enter the cron-details there. I already had a strange feeling about this as both CRON-processes asked for a timing to be set for the cron-job. That's why I was of the assumption that maybe "User Scripts" should just act as the "cron-editor" and once the script is set up there. Nextcloud might just be able to trigger it. As you can see, I really had no idea. But on the other hand if it's either Nextcloud or User Scripts that should manage the CRON, shouldn't I then be able to just disable the CRON in Nextcloud completely? (if that's an option at all).
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.