这个是安装了最新版本的truenas scale时发现的问题。如何处置呢?等下一个版本?No. 自行解决。
首先安装cron服务
apt-get update && apt-get install cron
安装完了立马把原来的cron任务停了, 因为貌似是不好用的。
crontab -u www-data -e
将里面的任务删除。
接下来,将任务运行在当前docker的root用户下面:
crontab -e
其中的任务表, 这里假设你把nextcloud安装到/var/www/html下边了:
*/5 * * * * sudo -u www-data php -f /var/www/html/cron.php
docker故障解决
cron运行cron.php时报错 bash: sudo: command not found
一个命令解决
apt-get install sudo
运行crontab -e编辑crontab任务时发生错误
no crontab for root - using an empty one update-alternatives: error: no alternatives for editor /usr/bin/sensible-editor: 25: editor: not found /usr/bin/sensible-editor: 28: nano: not found /usr/bin/sensible-editor: 31: nano-tiny: not found /usr/bin/sensible-editor: 34: vi: not found Couldn't find an editor! Set the $EDITOR environment variable to your desired editor. crontab: "/usr/bin/sensible-editor" exited with status 1
安装一个编辑器就解决了
apt-get install vim
或者执行
apt-get install vim-tiny
然后再重新在命令行里输入
crontab -u www-data -e
解决问题