1e41f4b71Sopenharmony_ci# WorkSchedulerExtensionContext
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciThe **WorkSchedulerExtensionContext** module, inherited from [ExtensionContext](../apis-ability-kit/js-apis-inner-application-extensionContext.md), provides a context environment for the WorkSchedulerExtensionAbility.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ciThis module provides APIs for accessing the resources of a WorkSchedulerExtensionAbility.
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ci> **NOTE**
8e41f4b71Sopenharmony_ci> 
9e41f4b71Sopenharmony_ci> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. 
10e41f4b71Sopenharmony_ci> The APIs of this module can be used only in the stage model.
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci## Usage
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ciThe context is obtained through a WorkSchedulerExtensionAbility child class instance.
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci```ts
17e41f4b71Sopenharmony_ciimport WorkSchedulerExtensionAbility from '@ohos.WorkSchedulerExtensionAbility';
18e41f4b71Sopenharmony_ciimport workScheduler from '@ohos.resourceschedule.workScheduler';
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ciclass MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility {
21e41f4b71Sopenharmony_ci    onWorkStart(workInfo: workScheduler.WorkInfo) {
22e41f4b71Sopenharmony_ci        let WorkSchedulerExtensionContext = this.context; // Obtain the WorkSchedulerExtensionContext.
23e41f4b71Sopenharmony_ci    }
24e41f4b71Sopenharmony_ci}
25e41f4b71Sopenharmony_ci```
26