PQ97759: SCHEDULER CRON FAILS WITH LATE DAY OF MONTH | |||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||
![]() APAR status Closed as program error. Error description The validator of CRON expression may be NOT correctly implemented. It seems that the validator depends on current month to check the DAY_OF_MONTH instead of the target month. For instance, if you want to schedule a task to run on Jan 31st every year, you should use "0 0 0 31 1 ?" as the cron expression according to Scheduler API Doc. If current month has 31 days (e.g. Jan, Mar, May, July, Aug, Oct and Dec) thas 31 days), then it does work fine. If the current month doesn't have 31 days, says Nov, it fails.Local fix Problem summary **************************************************************** * USERS AFFECTED: Any WebSphere Application Server user of * * the CRON calendar provided by the * * SchedulerCalendars application or by * * the Scheduler. * **************************************************************** * PROBLEM DESCRIPTION: The scheduled task may not run or the * * user may get an exception. * * the calendar may return a * * java.lang.IllegalArgumentException: * * DAY_OF_MONTH exception. If the * * validation error happens in the * * Scheduler.create() API method, * * then the exception will be wrapped * * in a UserCalendar exception and thrown * * to the API calling method. * * If the validation error happens when * * the scheduler is firing the task, the * * task will fail and will be logged as a * * SCHD0063E exception. The task will * * retry indefinitely until the error is * * resolved. * **************************************************************** * RECOMMENDATION: * **************************************************************** The validator of CRON expression may NOT be correctly implemented. It seems that the validator depends on current month to check the DAY_OF_MONTH instead of using target month. For example, if you want to schedule a task to run on Jan 31st every year, you should use "0 0 0 31 1 ?" as the cron expression according to Scheduler API Doc. If current month has 31 days (e.g. Jan, Mar, May, July, Aug, Oct and Dec), then the expression is interpreted correctly. If the current month doesn't have 31 days, (e.g. Feb, Nov), it fails.Problem conclusion The algorythm was changed to use the target month versus the current month. This corrected the problem.Temporary fix Comments
APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros Publications Referenced
|
Product categories: Software > Application Servers >
Distributed Application & Web Servers > WebSphere Application
Server > Enterprise Edition (EE)
Operating system(s):
Software version: 00A
Software edition:
Reference #: PQ97759
IBM Group: Software Group
Modified date: Mar 21, 2005
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.