Open WilliamMiceli opened 5 years ago
Also, small thing I happened to notice, but doesn't seem to make any difference:
CLI says to have as crontab:
(crontab -l; echo "* * * * * cd /var/www;/usr/bin/php7 bin/grav scheduler 1>> /dev/null 2>&1") | crontab -
Whereas Web UI says:
(crontab -l; echo "* * * * * cd /var/www;/usr/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -
(One is /usr/bin/php7
, other is /usr/bin/php
)
Don't know if that would matter to anything, but figured I'd mention.
The first thing to check is what user the 'webserver' runs with compared to when you are in the terminal. If they are different users, you are going to have this problem. The webserver can only check the crontab of the user it's running as. Also, the PHP version is a 'best guess' the symfony process command makes when trying to determine which PHP binary to use. It's not smart enough to use a specific version like you seem to have setup (php7
).
Within my /etc/nginx/nginx.conf
I have:
So the webserver user seems to be nginx, which has the crontab set.
Anywhere I might be missing?
I'm also getting this on a Debian 10 install where I have my crontab running as root and webserver is www-data.
I've setup my own Docker image for running Grav, but there's just one issue that I can't seem to figure out, and it is that the Web UI says that Cron isn't available, but yet it seems to be working just fine from what I can tell.
This is the warning that I'm trying to fix:
I have the crontab running under the nginx user, which seems to work just fine:
Using the CLI, I can verify that
nginx
has the correct crontab:And just to see if it would make a difference, I added it to the root user as well: ... But it still shows the same warning in the Web UI.
The CLI also shows that the backups are being run:
I'm not entirely sure what else I can do to see if I can get this warning fixed.
My Dockerfile:
Git repo
Thank you for your help!!