Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to run CRON.PHP

Featured Replies

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.

 

  • 1 year later...

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.

  • 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?

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.