Cluster.scheduleEvent()

Signature

void scheduleEvent(String schedulerName, String workKey, SimpleEvent event, long scheduledTime)

Domain

ACTION

Description

Schedules a simple event to be sent to the default destination after scheduledTime. The scheduled time is represented in milliseconds from January 1, 1970 (the UNIX epoch). Hint: To schedule a time n milliseconds from the present, you can use DateTime.getTimeInMillis() + n.

Parameters

NameTypeDescription
schedulerNameStringA unique id.
workKeyStringA unique key that identifies the work item.
eventSimpleEventThe simple event to be scheduled.
scheduledTimelongThe time in milliseconds when the event should be scheduled.

Returns

TypeDescription
void

Cautions

Events with default destinations on local channels will be received on the agent where the scheduler is running. If your configuration allows schedulers to run on cache agents (this is the default), do not schedule events with default destinations on local channels.