Update on Post #3
*Nextcloud trouble-shoot (Using Cron on background jobs):
I received help request from TrueNAS users on problem using "Cron" under the setting of nextcloud's background jobs setting: Under Basic settings => Background jobs. The problem will look like this where the background jobs failed to execute :
This is a common problem where quite a number of users on the nextcloud help forum could not append the necessary cmd to start the background jobs under the crontab. The documentation could be found here:
https://docs.nextcloud.com/server/l...ion_server/background_jobs_configuration.html
One of the key reasons is that they are unable to key in the command. This is due to the default use of "vi editor" instead of editor like "nano" when you try to append the crontab cmd. "vi editor" is actually commonly use in linux/unix.
If you are more familiar with "nano" you can change the default crontab editor to nano by keying:
Code:
setenv VISUAL /usr/local/bin/nano
OR
You could follow my steps here and just get it done by using the default vi editor to append the crontab cmd to setup "Cron" for back ground jobs on nextcloud:
Code:
Open up the shell from the root of the nextcloud jail, type cmd:
crontab -u www -e (*instead of www-data)
Next you will be inside the vi editor cmd environment with "~" on the left hand side.
<=
~
~
~
~
~
~
~
~
~
~
type "i" or "a" to enter into cmd mode to edit/append. Your cursor to key will appear at the top.
Followed by append/input the following:
*/5 * * * * /usr/local/bin/php -f /usr/local/www/nextcloud/cron.php (*slightly diff from the documentation due to diff in run env)
After keying, hit "Esc" to exit from the cmd mode, where the cursor will appear at the bottom.
Type ":wq" and hit "Enter" to exit and save.
ALT: You can exit and save by typing "Shift + zz"
After exit from vi editor, type cmd
crontab -u www -l (*to verify that the crontab command has been appended.)
You should see output:
*/5 * * * * /usr/local/bin/php -f /usr/local/www.nextcloud/cron.php
type exit and you are DONE!
When you enter into your nextcloud basic setting, this will be the end result you see:
==============================================================================
*If you wish to learn more on vi editor, you can read/watch this:
Basic vi editor cmd:
https://www.cs.colostate.edu/helpdocs/vi.html