Grav scheduler is not working

Hello everyone The scheduler does not work on my site.

On the web I have this picture:

In the console so:

user@server:/root_directory $ php8.0 bin/grav scheduler -d

Job Details
===========

┌─────────────────────┬──────────────────┬──────────────────┬────────┐
│ Job ID              │ Last Run         │ Next Run         │ Errors │
├─────────────────────┼──────────────────┼──────────────────┼────────┤
│ default-site-backup │ 2020-12-19 03:00 │ 2022-01-27 20:06 │ None   │
└─────────────────────┴──────────────────┴──────────────────┴────────┘

And in the files so:

user@server:/root_directory $ cat user/config/scheduler.yaml
status:
cache-purge: enabled
cache-clear: enabled
default-site-backup: enabled

The crown works correctly:

user@server:/root_directory $ tail -1 /var/log/cron.log

Jan 27 20:26:01 server CRON[01]: (www-data) CMD (cd /root_directory;/usr/bin/php8.0 bin/grav scheduler >> /dev/null 2>&1)

The command is also executed correctly, which means the problem is on the Grav side.

Please tell me where to dig

There are two reasons coming to my mind that can cause this issue:

  1. I am citing the documentation on this: “You need to be logged in to the shell with the same user as your webserver. This is to ensure that the user that runs the schdeduler commands matches the webserver user that needs to interact with those files. If you install the crontab entry with another user (e.g. root ) any files created will be created as that root user and not the webserver user which can lead to problems.” (see Scheduler | Grav Documentation)
  2. There is a configuration “gotcha”, that I run into myself several times. You can configure grav based on the url it is accessed. That means your website is reachable calling example.com, all configuration is tied to this url. The cron job on the other side uses localhost when calling the scheduler job, so the configuration bound to example.com will not apply! (see Environment Configuration | Grav Documentation)