Immediate after installing 5.0-beta1 i navigated to the administration section, where i got the following error message: One or more problems were detected with your Drupal installation. Check the status report for more information.

The status report:
Cron maintenance task Never run
Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for configuring cron jobs. You can run cron manually.

Emek

CommentFileSizeAuthor
#12 cron_error.patch3.42 KBcatch
#6 cron_error.patch2.62 KBcatch

Comments

danbh’s picture

Status: Active » Closed (works as designed)

I think this is supposed to happen. Just as the error says, you can setup cron jobs to run automatically, or you can run it manually.

See here: http://drupal.org/cron

robloach’s picture

Version: 5.0-beta1 » 7.x-dev
Component: base system » usability
Status: Closed (works as designed) » Active

After installing Drupal Head, you're presented with two messages:

  1. Cron has not run. Please visit the status report for more information.
  2. One or more problems were detected with your Drupal installation. Check the status report for more information.

Do we really need to tell the user that the cron has not run right after a fresh install? They'll see that it hasn't been run when they visit the status report anyway....

maartenvg’s picture

I agree with Rob. The second message is sufficient and more recognizable because that is the message you get every time something goes awry.
Let's drop the first message.

maartenvg’s picture

Ok. I've look at this and they are quite independent of each other.
1) This is always shown when cron has never run. It has severity WARNING.
2) This is only shown when there are runtime requirements that aren't met with severity ERROR.

Message 1 is always shown after installation. Message 2 isn't always shown, only when something isn't right (like access rights on the file system). In fact, I almost never see it after a fresh install.

The only (clean) way to drop Message 1 while still pointing people to the status log when there aren't any other problems, is by setting the severity of Message 1 to ERROR, so it triggers Message 2. But this is not a good idea, because not running cron is not an ERROR but a WARNING or NOTICE. In the comments it's called an "helpful reminder".

Other methods require quite ugly hacks, which aren't worth it, in my opinion. Therefore I'm revising my opinion and say let's mark this "won't fix".

rickvug’s picture

I agree that the cron not running message should be dropped. It is a poor first impression.

Thinking about this problem, I suspect that a large quantity of Drupal installations never setup cron or only run it periodically from the status page. This is a drastic solution but what about building Poorman's cron into Drupal core and having it enabled as a default behavior? The same people who setup cron properly would be able to turn off "auto-cron" on the performance settings page. My main concern with this approach is that it would change Drupal to cater to those who are not installing it properly.

catch’s picture

Status: Active » Needs review
StatusFileSize
new2.62 KB

I think we should just drop the first message. Spoke to Bojhan and yoroy on irc and hopefully weigh in there. Here's a patch to try out.

Bojhan’s picture

Our reasons are aligned with those in this issue queues, I was attending a training session on Drupal and noticed that people got this message on there first install and where confused by it, as the training progressed I saw them going back to the error numerous times - deciding it was irrelevant at that moment.

So since its quite an essential thing to configure, we should notify the user that it hasn't been run - though we shouldn't do this on the initial install. Maybe after a day or so, just not in the beginning.

yoroy’s picture

1) This is always shown when cron has never run. It has severity WARNING.
2) This is only shown when there are runtime requirements that aren't met with severity ERROR.

1: Running cron is not critical for a succesfull *installation*. It's not encouraging to succesfully install Drupal, then visit /admin and be treated on error messages.
I know that setting a crontab is not per se Drupal core's job, but let's not make it the user's job before it actually matters, either.

2: This is helpful and 'in context': only shown when you enable functionality that relies on cron being run regularly.

So, I'd also say we can safely simply remove the first warning

dries’s picture

I'd support this.

It might also be useful to run cron as the last step of the installation process? As such, cron would have run at least once. :)

catch’s picture

I was originally going to run cron as part of the installation process, then realised that the 'never run' was a different message to the 'has not run for X days' message. I couldn't think of a reason to run cron on install, except to suppress the message, so getting rid of the message seemed like a better option. But if there's another reason to run cron on install then we probably should - maybe if an install profile comes with content and search module enabled? I don't think it's necessary to suppress the message though.

dries’s picture

I think it would be nice to run cron on install. For example, say the aggregator module ships with some default news feeds, then it would be great if those feeds worked. It would also trigger the update module to run. So if someone installs an outdated Drupal version (e.g. through cPanel or Plesk), it would actually tell them sooner than late. In other words, I don't see a reason not to run cron as part of the last installation step. It can be a separate patch if preferred.

catch’s picture

StatusFileSize
new3.42 KB

I hadn't thought about update status at all - that in itself is a worthwhile reason to run cron that first time, install profiles could presumably do it themselves if they added default content, but it's a basic enough task that it's worth centralising here. So here's a patch with that added in.

dries’s picture

Status: Needs review » Fixed

Reviewed and looks great. Committed to CVS HEAD. Thanks catch.

robloach’s picture

For those of you interested in cron running, you might want to have a look at #331611: Add a poormanscron-like feature to core.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.