Nextcloud version (eg, 20.0.5): 26.0.1 (tried also with 25.0.3)
Operating system and version (eg, Ubuntu 20.04): NextcloudPi running in a proxmox environment
Apache or nginx version (eg, Apache 2.4.25): `how can i found it?
PHP version (eg, 7.4): 8.1.16
The issue you are facing:
I’m unable to set a cronjob in cronfile
Is this the first time you’ve seen this error? (Y/N): Y
i list the contabs with: crontab -l
i save my crontabs in “crontab_root” (crontab -l > crontab_root)
i’m activating my crontab with: crontab crontab_root
In general you should give the full path of the command or you can put the PATH variable into crontab (as example):
#minute Hour Day of Month Month Day of Week Command
(0-59) (0-23) (1-31) (1-12 or Jan-Dec) (0-6 or Sun-Sat)
Imho your error is the “www-data” in the second line.
If you create cron jobs with the crontab mechanism, crontab files are created for individual users and they do not have the username field in its syntax unlike the system-wide crontab /etc/crontab where you don’t have to run the ‘crontab’ command to install the new version when you edit the file. That file have a username fields that none of the other crontabs do.
It should look like this when using the ‘crontab’ command:
Than you have to add whole command from the cron to the shell and test if it is executable. Probably user has no right to create logs. Just do as above, add to the following command you cron command: