Author |
Message |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
Holidays.txt not functioning |
|
Yesterday was a public holiday here but we had four timed jobs set not to run on holidays fire anyway?
Here is the line from holidays.txt
27/10/2008 Labour Day
It didn't have any impact but it looks like the holiday definition had no effect?
Thanks
Lee
|
|
Mon Oct 27, 2008 5:02 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7954
|
|
|
|
This is really strange. I assume you run 24x7 as a service. If this is the case please verify default Regional settings do match your settings when running in interactive mode. In many cases computers have their default settings set to North America which remain unnoticed because users can only set their own settings which are saved in a different part of the registry. When services load, they read from the default part
HKEY_CURRENT_USER\Control Panel\International
vs
HKEY_LOCAL_MACHINE\Control Panel\International
In case the default settings are set to North America with mm/dd/yyyy date format, they may cause the scheduler not load dates correctly from the holidays file as well as cause other anomalies.
Also please check the same settings for the account running the service. They should be all in sync.
|
|
Mon Oct 27, 2008 7:21 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
The default language was set to english (us) which might have caused it, the reg keys you quote don't exist in that location but I checked the regional options control panel applet
|
|
Mon Oct 27, 2008 7:51 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
having said that though the default standards on the first page of the applet did come up correct as NZ.
The language I changed was the input language not the locale.
|
|
Mon Oct 27, 2008 7:52 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7954
|
|
|
|
What you see in the Control Panel is a set of your settings from the HKEY_CURRENT_USER hive. When the service loads, it reads from a different set. The most important is date/time format in the settings, it should match date format in the holidays file, otherwise months can be processed as days and visa versa.
|
|
Mon Oct 27, 2008 7:59 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7954
|
|
|
|
Here is the exact path HKEY_USERS\.DEFAULT\Control Panel\International\sShortDate. Please verify this value is correct and the same as HKEY_CURRENT_USER\Control Panel\International\sShortDate
|
|
Mon Oct 27, 2008 8:03 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
I've checked hkey_users\default\control panel\international and it looks ok?

|
|
Mon Oct 27, 2008 8:05 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7954
|
|
|
|
Please run test JAL job as below
Dim result, boolean
IsHoliday ( "27/10/2008", result )
LogAddMessage( "INFO", @V"job_id", "@V"job_name"", result )
What do you get in the log when you run it (scheduler should be run normally as a service)?
|
|
Mon Oct 27, 2008 8:15 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
That code returns true.
|
|
Mon Oct 27, 2008 10:46 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7954
|
|
|
|
Are you sure the holidays file has been updated before last scheduler restart?
|
|
Mon Oct 27, 2008 10:55 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
Absolutely I populated it months ago.
|
|
Mon Oct 27, 2008 10:55 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7954
|
|
|
|
I suggest to try the following: copy holidays and job database files to a different computer, create new job database file (File/New/Job Database) and copy 4 affected jobs to that new file (Tools/Job Database Manager), update holidays to include current date as a new holiday and then restart scheduler in GUI mode. This way we can check if 24x7 is going to ignore the updated holidays and still run the copied jobs. If it does, the holidays are not getting loaded correctly. If it doesn't, stop it and start as a service and verify the results are consistent when 24x7 is run in service mode. The goal is to identify whether computer regional settings have impact on how holidays are loaded or processed.
|
|
Mon Oct 27, 2008 11:28 pm |
|
 |
|