FreeNAS 9.10 - Cron tasks triggering at UTC time, not local time

Status
Not open for further replies.
Joined
Dec 2, 2015
Messages
730
I'm running FreeNAS-9.10-STABLE, updated from 9.3-STABLE yesterday, using the update tool in the GUI.

I noted that the time zone had gone to the first in the list after the system rebooted following the update (Africa/Abidjan). I live in Ottawa, Canada, so I set it to America/Toronto, and confirmed the time was correct, both in the GUI and in the CLI using the date command.

Today, I noted that some scripts (set up in Tasks -> Cron Jobs) that email me status info at particular times had arrived four hours early (i.e, they arrived at the UTC time, not the local time). With 9.3, these cron tasks would trigger at the expected local time.

Is this an expected change?

Hardware (I doubt it is relevant, but rules are rules):

Motherboard: SuperMicro X10SL7-F
CPU: Intel G3258
RAM: 16G Crucial CT2KIT102472BD160B/CT2CP102472BD160B
PSU: SeaSonic SSR-550RM
Boot USB flash drives:
San Disk Cruzer Fit Usb Flash Drive 16 GB
Kingston 16GB DT Microduo 3C
Hard drives: 5 x Western Digital Red 4 TB in RAIDZ2
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Report it as a bug, I'd say.

Local time is "all in your imagination" from the UNIX point of view, and you can create different process groups each of which have their own idea of what the local timezone is, just by affecting TZ. Internally the system wants to run as UTC.

It is quite possible that the change to 9.10 did something to cron that changed its effective timezone to UTC.
 
Joined
Dec 2, 2015
Messages
730
Joined
Dec 2, 2015
Messages
730
Report it as a bug, I'd say.

Local time is "all in your imagination" from the UNIX point of view, and you can create different process groups each of which have their own idea of what the local timezone is, just by affecting TZ. Internally the system wants to run as UTC.

It is quite possible that the change to 9.10 did something to cron that changed its effective timezone to UTC.
Understood. But, from the user's perspective, it is most useful if the cron tasks defined via the GUI are defined using local time. My watch is set to local time, and I bet yours is too. If I want to work in UTC, I can change the system time zone to UTC, and then the GUI would work in UTC. And that is how it worked in 9.3.1.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Yes. The point is, a developer who is maybe reorganizing the code may not have realized that there was some environmental dependency, resulting in a different behaviour now.
 

crimsondr

Dabbler
Joined
Feb 6, 2015
Messages
42
I also have inconsistent times. I have an x10sl7-f motherboard and from IPMI I can see the timezone is UTC-5 and DST is enabled to give me 8:43am now. Within FreeNAS from shell the date command also gives me the same time. I have a cron job to run everyday at 5am (email smart report) but it emails everyday at 8am instead.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Yes, if it's a bug for one person, it's usually a bug for everyone.
 

crimsondr

Dabbler
Joined
Feb 6, 2015
Messages
42
I read the second last comment of Issue 14266 where it was reported the issue fixed itself. But now I see the last comment someone reported still having the issue.

Does this only affect cron? Or will it affect the scrubs and smart test scheduling as well? I'm currently running badblocks which won't end for another couple days so I can't test at the moment.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
No idea, sorry. SMART tests should not be an issue since SMART is supposed to get out of the way of host traffic, and your disks probably aren't 100% busy to the point where there's no chance of it completing before the next SMART test. I'm guessing those are spawned by the middleware, so my best *guess* is that they'd be in the proper timezone. A reboot after changing timezone is probably prudent.
 

Andrej

Cadet
Joined
Dec 22, 2016
Messages
3
Hi, I´m new in FreeNAS.
My FreeNas knowledge is basic.
I´m runing with FreeNAS-9.10.2 (a476f16).
I have similar problem with triggering cron job.
My time zone is EUROPE/Bratislava.
I create easy local rsync cron job, but it triggering 9 hours later as is adjusted.
So if I wish running my cron job at 3:00 , it must be adjusted at 18:00, as you can see in attached picture.
In system processes I see correct local time.
Please can you help me solve this problem?
Than you in advance.
 

Attachments

  • 01.png
    01.png
    18.1 KB · Views: 246
D

dlavigne

Guest
Please create a bug report at bugs.freenas.org and post the issue number here.
 

Andrej

Cadet
Joined
Dec 22, 2016
Messages
3
Issue number is 20204
 

Andrej

Cadet
Joined
Dec 22, 2016
Messages
3
Hi.
After last update, my problem is solved.
Solution was included in this update after open issue 20204 by me?
If yes,thank you for very quick action :)
Best regards
Andrej
 
Status
Not open for further replies.
Top