Most server-side applications have routine tasks that must be performed periodically. For example, a component in the application might need to clear a cache every 10 minutes, or send email each morning at 2:00, or rotate a set of log files on the first of every month.
The Oracle Commerce Platform includes a Scheduler service, atg.service.scheduler.Scheduler
, which keeps track of scheduled tasks and executes the appropriate services at specified times. You can see a list of all scheduled tasks in the Component Browser at /atg/dynamo/service/Scheduler
.
The Oracle Commerce Platform also includes a SingletonSchedulableService
, atg.service.scheduler.SingletonSchedulableService
, which enables multiple Oracle Commerce Platform servers to run the same scheduled service, while guaranteeing that only one instance of the service performs the scheduled task at a time. This provides some protection from server failures, as the loss of one Oracle Commerce Platform server does not prevent the scheduled service from running on another Oracle Commerce Platform server.