nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.39k stars 4.07k forks source link

tests OK, cron warning #37468

Closed 4444cccc closed 1 year ago

4444cccc commented 1 year ago

Hello,

Without changing the cron job (up to yesterday everything was excellent) I have the error that cron job was not executed for 1 hour. Even this is not correct, because a lot more than one hour passed. I upload the screenshots. Any ideas about the red warning and how to eliminate it? Thanks! tests cron

skjnldsv commented 1 year ago

Hi, do you actually have a cron job set up? What was the log/result of the last run?

4444cccc commented 1 year ago

Hello, I use this line sudo -u admin php -f /home/admin/web/path....../cron.php --define apc.enable_cli=1 No errors from the last 2 days, when the error began to appear.

skjnldsv commented 1 year ago

What happens if you run it manually ? That looks like a setup issue, not a bug to be honest with you :)

4444cccc commented 1 year ago

Hi, No error from the command line. Tested already. After the update there were no problems. This happened about a day ago. I got email for the problem. There were updates for the server and updated it.

joshtrichards commented 1 year ago

Wait... are you running the cronjob manually from the command line every time? Do you have an actual entry in your system crontab?

4444cccc commented 1 year ago

Hi, Of course not manually. There is a crong job command which works.

sudo -u admin php -f /home/admin/web/path....../cron.php --define apc.enable_cli=1

The red screen for one hour "not executuon" of the job is still for one hour - already two days. All tests are passed with green tick. No change.

In fact the problem still exists and it appeared after the "automatic" update of Hestia control panel... Any ideas for removing the annoying red message?

skjnldsv commented 1 year ago

I would double check your cron service is actually running

4444cccc commented 1 year ago

If it was not running correctly, It would be written that last job was executed e.g. 1 day ago. It stays on 1 hour. Also, I have passed all test with green mark. There also should be warning, but it is OK. More, the issue appeared after Hestia panel update.

skjnldsv commented 1 year ago

But 1h is not good enough? Documentation says 5 minutes... https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/background_jobs_configuration.html

4444cccc commented 1 year ago

At five minutes or any other time interval - the situation is the same. Already tested.

skjnldsv commented 1 year ago

Let me resume:

  1. You set a cron job to 5min
  2. Your nextcloud displays a warning saying the last cron job executed more than an hour ago
  3. You checked manually that running the cron job does NOT generate errors

Can you confirm? I cannot reproduce the issue and all the other users/customers seems to have this working fine. :) So before confirming this as a bu, we need to make sure this is not a setup issue

skjnldsv commented 1 year ago

Hello, I use this line sudo -u admin php -f /home/admin/web/path....../cron.php --define apc.enable_cli=1 No errors from the last 2 days, when the error began to appear.

Just noticed you're using the admin user to run the cron job. Why are you not using your php/webserver user? This is in the docs and a hard requirement.

4444cccc commented 1 year ago

Hi,

Let me write again what happened: -The problem began since the updated Hestia Cpanel and I noticed this. Even my password was not accepted, I did reset. -It does not matter the time interval - 2, 5, 8 mins - tested. -I know that if there is a problem, the test will not be in green colour (not it is always in green). -If there is a problem with the cron job, I get email immediately- tested. I have no emails with this configuration. -I tested with external cron service, no errors (I disbled server cron job to do the test) External cron service says 200 OK. -If I have problems for more than 10 mins. my test do not succeed (now it is green). -The one hour is false - this message is for about 1-2 weeks. It says always one hour. That's it.

skjnldsv commented 1 year ago

Sorry, I'm trying to follow your explanations :) I think the real issue is about the weirdly worded french translation ? The English error message says "Last job execution ran 1 hour ago. Something seems wrong."

4444cccc commented 1 year ago

I know what it says for this one hour. The "one hour" is still one hour even about 10 days, which is not true. I want to know what caused the problem and of course to fix it. I.e to return to the normal situation before update oh Hestia panel.

skjnldsv commented 1 year ago

Sorry, then it's a setup issue, I would ask you to ask on https://help.nextcloud.com