Microsoft SDK for Java

schedule

The schedule method of the TaskManager Class contains the following signatures:

schedule(Runnable runnable)
schedule(Runnable runnable, long when)
schedule(Runnable runnable, long when, boolean lightweight)

schedule(Runnable runnable)

Schedules a runnable object to run immediately.

Syntax

public int schedule(Runnable runnable);

Return Value

Returns a non-zero integer that identifies the task.

Parameters

runnable The object that is run.

schedule(Runnable runnable, long when)

Schedules a runnable object to run at a specified time.

Syntax

public int schedule(Runnable runnable, long when);

Return Value

Returns a non-zero integer that identifies the task.

Parameters

runnable The object that is run.
long The time at which the object is to start.

schedule(Runnable runnable, long when, boolean lightweight)

Schedules a runnable object to run at a specified time.

Syntax

public synchronized int schedule(Runnable runnable, long when, boolean lightweight);

Return Value

Returns a non-zero integer that identifies the task.

Parameters

runnable The object that is run.
when The time at which the object is run.
lightweight Set to true to run the task as a lightweight task.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.