Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028003Openbravo ERPA. Platformpublic2014-10-28 13:082018-10-30 10:17
egoitz 
inigosanchez 
normalminoralways
closedfixed 
5
 
3.0PR15Q13.0PR15Q1 
alostale
Core
No
0028003: The daily background process is executed incorrectly when changing from summer time to winter time
The daily background process is executed incorrectly when changing from summer time to winter time.
ON that case the it is executed one hour before the scheduled time.

-Define a background process to be executed every day at 12:00
-one night change the hour from 3:00 to 2:00
-Next day the process is executed at 11:00

The process has been executed after 24 hours, but that is not the correct time.
Check on the OBSchedule.java that line:

trigger = TriggerUtils.makeHourlyTrigger(interval * 24);


Also could be a bug on the quartz library.

No tags attached.
has duplicate defect 0035516 closed egoitz The background process are executed on an incorrect hour after the change of the time on the server (summer time) 
related to defect 0028261 closed inigosanchez Weekdays process scheduling doesn't work 
related to defect 0039564 closed platform weird scheduled Process Request defaults 
Issue History
2014-10-28 13:08egoitzNew Issue
2014-10-28 13:08egoitzAssigned To => AugustoMauch
2014-10-28 13:08egoitzModules => Core
2014-10-28 13:08egoitzResolution time => 1418598000
2014-10-28 13:08egoitzTriggers an Emergency Pack => No
2014-11-03 09:08egoitzTarget Version => 3.0PR15Q1
2014-11-04 16:16alostaleAssigned ToAugustoMauch => inigosanchez
2014-11-10 11:37inigosanchezNote Added: 0071523
2014-11-10 12:05hgbotCheckin
2014-11-10 12:05hgbotNote Added: 0071525
2014-11-10 12:05hgbotStatusnew => resolved
2014-11-10 12:05hgbotResolutionopen => fixed
2014-11-10 12:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/22b389ae25454ae90b481b661d2d1279b9caf339 [^]
2014-11-10 12:10inigosanchezStatusresolved => new
2014-11-10 12:10inigosanchezResolutionfixed => open
2014-11-10 12:10inigosanchezIssue Monitored: alostale
2014-11-10 12:11inigosanchezReview Assigned To => alostale
2014-11-10 12:11inigosanchezStatusnew => scheduled
2014-11-10 13:49inigosanchezStatusscheduled => resolved
2014-11-10 13:49inigosanchezResolutionopen => fixed
2014-11-24 15:17alostaleNote Added: 0071938
2014-11-24 15:17alostaleStatusresolved => closed
2014-11-24 15:17alostaleFixed in Version => 3.0PR15Q1
2014-11-24 15:22alostaleRelationship addedrelated to 0028261
2014-12-30 23:24hudsonbotCheckin
2014-12-30 23:24hudsonbotNote Added: 0073034
2017-03-15 14:17alostaleRelationship addedrelated to 0035516
2017-03-15 16:24egoitzRelationship replacedhas duplicate 0035516
2018-10-30 10:17alostaleNote Added: 0107650
2018-10-30 10:27alostaleRelationship addedrelated to 0039564

Notes
(0071523)
inigosanchez   
2014-11-10 11:37   
The behavior described in "Steps To Reproduce" is correct because in that case 24 hours have elapsed.

It has been fixed the problem when a process is scheduled every day without choosing the option "Every n days". This case had a bad behavior.
(0071525)
hgbot   
2014-11-10 12:05   
Repository: erp/devel/pi
Changeset: 22b389ae25454ae90b481b661d2d1279b9caf339
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Mon Nov 10 12:01:36 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/22b389ae25454ae90b481b661d2d1279b9caf339 [^]

Fixes issue 28003: Daily background process is executed incorrectly sometimes.

The daily background process is executed incorrectly when it is not selected option "Every n days".

Now, it has been fixed the problem when a process is scheduled every day without choosing the option "Every n days" by using a cron expression like this:
final String cronExpression = second + " " + minute + " " + hour + " ? * *";

Now, a daily background process has been executed every day at same hour.

---
M src/org/openbravo/scheduling/OBScheduler.java
---
(0071938)
alostale   
2014-11-24 15:17   
code reviewed

tested:
-Daily interval works as expected
-Every n days interval creates a every (24hrs x n) interval, meaning execution is triggered after this period regardless DST changes
(0073034)
hudsonbot   
2014-12-30 23:24   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/6525fe229e06 [^]
Maturity status: Test
(0107650)
alostale   
2018-10-30 10:17   
Note in more recent Quartz versions it is possible to schedule actual evey n days (rather than every 24*n hours) using quartz cron expressions.