> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
```
import WorkSchedulerExtensionAbility from '@ohos.WorkSchedulerExtensionAbility'
```
## WorkSchedulerExtensionAbility.onWorkStart
-**System capability**
SystemCapability.ResourceSchedule.WorkScheduler
-**API**
onWorkStart(workInfo: WorkInfo);
-**Description**
Triggered when the Work Scheduler task starts.
-**Example**
```
export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility {
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
```
import workScheduler from '@ohos.workScheduler'
```
## workScheduler.startWork
startWork(work: WorkInfo): boolean
Instructs the **WorkSchedulerService** to add the specified task to the execution queue.
| callback | AsyncCallback\<[WorkInfo](#workinfo)> | Yes | Callback used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; returns **null** otherwise.|
| Promise\<[WorkInfo](#workinfo)> | Promise used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; returns **null** otherwise.|
| Promise\<boolean> | Promise used to return the result. Returns **true** if the last execution of the specified task timed out; returns **false** otherwise.|
**Example**
```
workScheduler.isLastWorkTimeOut(500)
.then(res => {
console.info('workschedulerLog isLastWorkTimeOut success, data is:' + res);