Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023653Openbravo ERPA. Platformpublic2013-04-26 15:012013-04-30 21:05
jecharri 
alostale 
immediatemajorrandom
closedfixed 
5
pi 
3.0MP233.0MP23 
AugustoMauch
Google Chrome
Core
No
0023653: Incorrect execution time for daily processes scheduled PM
Processes scheduled to be executed daily starting from 13:00:00 to 00:59:59 (Server local time) are incorrectly rescheduled after Tomcat restart if the process has been run at least once.

After restart the starting hour changes -12 hours, for example if scheduled to 0:00:00, it becomes in 12:00:00, for all subsequent executions.

Note this doesn't affect to other schedul plans such as monthly, last day of month, etc


Workaround: till this patch is applied, in order to ensure correct time execution, do not schedule processes to be run PM.
1- Create a new process scheduled to be run daily at 15:00. If tomcat is not restarted subsequent executions will also be at 15:00.
2- Wait till 15:00, the process is correctly executed -> OK
3- Restart tomcat
4- Following executions of this process will take place at 3:00 -> INCORRECT

Note: if after step #3 and before #4 Tomcat is restarted again the process will be run at 15:00 till next restart.

Performance
related to defect 00237673.0MP24 closed alostale Background process scheduled weekly executed after restart tomcat 
Issue History
2013-04-26 15:01jecharriNew Issue
2013-04-26 15:01jecharriAssigned To => AugustoMauch
2013-04-26 15:01jecharriWeb browser => Google Chrome
2013-04-26 15:01jecharriModules => Core
2013-04-26 15:01jecharriTriggers an Emergency Pack => No
2013-04-29 12:11AugustoMauchAssigned ToAugustoMauch => alostale
2013-04-29 13:52egoitzIssue Monitored: egoitz
2013-04-29 16:02alostaleWeb browserGoogle Chrome => Google Chrome
2013-04-29 16:02alostaleDescription Updatedbug_revision_view_page.php?rev_id=4626#r4626
2013-04-29 16:02alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4628#r4628
2013-04-29 16:02alostaleWeb browserGoogle Chrome => Google Chrome
2013-04-29 16:02alostaleSummaryWhen you schedule a process it can not work fine => Incorrect execution time for daily processes scheduled PM
2013-04-29 16:08alostaleWeb browserGoogle Chrome => Google Chrome
2013-04-29 16:08alostaleDescription Updatedbug_revision_view_page.php?rev_id=4629#r4629
2013-04-29 16:08alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4630#r4630
2013-04-29 16:10alostaleTag Attached: Performance
2013-04-29 16:10alostaleReview Assigned To => AugustoMauch
2013-04-29 16:10alostaleWeb browserGoogle Chrome => Google Chrome
2013-04-29 16:31hgbotCheckin
2013-04-29 16:31hgbotNote Added: 0058302
2013-04-29 16:31hgbotStatusnew => resolved
2013-04-29 16:31hgbotResolutionopen => fixed
2013-04-29 16:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/23cf0735e7c3abcb1763cdc07b9c20ce69ec675d [^]
2013-04-29 16:32alostaleNote Added: 0058303
2013-04-30 12:27AugustoMauchNote Added: 0058344
2013-04-30 12:27AugustoMauchStatusresolved => closed
2013-04-30 12:27AugustoMauchFixed in Version => 3.0MP23
2013-04-30 21:05hudsonbotCheckin
2013-04-30 21:05hudsonbotNote Added: 0058383
2013-05-09 08:23alostaleRelationship addedrelated to 0023767

Notes
(0058302)
hgbot   
2013-04-29 16:31   
Repository: erp/devel/pi
Changeset: 23cf0735e7c3abcb1763cdc07b9c20ce69ec675d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon May 06 16:17:45 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/23cf0735e7c3abcb1763cdc07b9c20ce69ec675d [^]

fixed bug 23653: Incorrect execution time for daily processes scheduled PM

  - Date format to retrieve next fire time from DB was incorrect (java format
    instead of SQL one): as this is queried to be consumed internally don't use
    any configurable formatting but a hardcoded one.
  - Do not remove next fire time from DB when a process is scheduled.
  - Added debugging log.

---
M src/org/openbravo/scheduling/OBScheduler.java
M src/org/openbravo/scheduling/ProcessMonitor.java
M src/org/openbravo/scheduling/ProcessRequest_data.xsql
M src/org/openbravo/scheduling/Trigger_data.xsql
---
(0058303)
alostale   
2013-04-29 16:32   
Known issue: current fix does not solve instances with process is status #4 (see steps to reproduce).

In this cases execute this script in DB:

update ad_process_request set previous_fire_time = null;
(0058344)
AugustoMauch   
2013-04-30 12:27   
Code reviewed and verified in pi@a7efc1231554
(0058383)
hudsonbot   
2013-04-30 21:05   
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/3ea22ca7a348 [^]

Maturity status: Test