Creating a day-of-month scheduling task command implementation
The Subscription scheduler supports simple scheduling, which is based on the fixed frequency between fulfillment dates. In this lesson, you implement a new task command to support the day-of-month scheduling.
This day-of-month schedule task command performs the two following tasks:- Computes the entire schedule given the schedule type and the day-of-month values.
- Computes the next occurrence, given the previous fulfillment occurrences and the existing schedule information.
Procedure
- Copy the DayOfMonthScheduleEvaluationCmdImpl.java file:
- In the Enterprise Explorer view, expand .
- Right-click .
- Name the Package: com.mycompany.commerce.subscription.commands
- Copy the DayOfMonthScheduleEvaluationCmdImpl.java file from the temporary location where you extracted ServiceProvider.zip, temp\src\com\mycompany\commerce\subscription\commands to the Package created in the last step in WebSphere Commerce Developer.
- Ignore if any errors are present in the DayOfMonthScheduleEvaluationCmdImpl.java file.
- Register the following command implementation in CMDREG
table:
- Connect to the development database.
-
Insert into cmdreg (storeent_id,interfacename,classname,target) values (0,'com.ibm.commerce.subscription.commands.ScheduleEvaluateCmd+DayOfMonthSchedule','com.mycompany.commerce.subscription.commands.DayOfMonthSchedulerEvaluateCmdImpl','Local');