• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

As designed Cron "next run" has wrong time

ceribik

Well-known member
#1
I've reproduced this on two different computers. On one of them, I can confirm that the system, php, xenforo public and my xenforo user timezones are all the same (GMT+11).

If you create a cron event that uses the default time settings (midnight every day), or look at any default cron event, they are all set to run 11 hour earlier (note that it's offset by the same amount as the timezone).

E.g. this one is supposed to run at 12:30 AM:

Record Daily Statistics Next Run: Jan 20, 2012 at 11:30 AM
 

ceribik

Well-known member
#2
To add to this, all the cron entries which are set to run every x minutes (as opposed to daily) show the correct next run time.
 

Mike

XenForo developer
Staff member
#5
Basically, the times entered in the cron are based on GMT/UTC. This creates consistency across systems as it means the same thing anywhere.

There isn't really a "fix" per se. You could argue all sorts of points of view.
 

digitalpoint

Well-known member
#6
At the very least, maybe you should specify that it's GMT/UTC on the date/time. If I'm on a site that most every date/time is adjusted to reflect MY date/time, one comes to expect that everywhere on the site.

Personally, I'd like to see it changed to reflect MY time since I'm the one reading it, and for me, THAT would be consistent. If it's actually an issue of consistency, why not have posts/threads reflect GMT/UTC for consistency? :)

Of course it would be a bigger issue if more people saw it than just admins... but being okay with something simply because most people don't see it also seems a bit silly to me.

For ME it looks like cron entries are failing because the next run time on some of them is 7 hours ago.
 

ceribik

Well-known member
#7
Basically, the times entered in the cron are based on GMT/UTC. This creates consistency across systems as it means the same thing anywhere.
The only sort of consistency I see it maintaining is across multiple XenForo installations which for the most part is pointless. If you wanted consistency within a single XenForo installation, I don't see why someone would logically choose to base it on GMT. It should be based off the board timezone. Otherwise, why bother showing it to admins, and making it available to addon developers? It makes it useless to the latter (who need stuff run at specific times) without some hacky code to adjust the timing.
 

Biker

Well-known member
#9
Basically, the times entered in the cron are based on GMT/UTC. This creates consistency across systems as it means the same thing anywhere.
Consistency for whom? It certainly is not consistent for the Admin. Seriously, what's wrong with this picture?
 
#10
I don't know... but I log in as admin with my admin account. this account is loaded and it should have some settings loaded... why don't make use of them? Or use board settings or even a small notice that this is GMT/UTC (I could live with that but I prefer the account based solution)... To make sure the admins can handle the cron job, something needs to be done here...
I mean this is pretty weird... After all if it is as designed, then there should be a Suggestion for the change.
 

Brent W

Well-known member
#13
Well this ever be considered as something that will change? I still don't understand why you can't/won't use the boards default time zone for crons? What is a scenario where I, as the board owner, will become confused if the boards default time zone is used?
 
#14
At the very least, please consider adding a warning to the cron settings page, stating that times are based on UTC. That would have saved me a couple of hours of troubleshooting. Before I found this thread, I thought that I had a server issue to sort out.