diff --git a/en/application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md b/en/application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md index ab02ed0f2c5bf6bf553f6a36f6a94442db2bb378..9118b8b56684cc021cbd83511a905e28d5ddaead 100644 --- a/en/application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md +++ b/en/application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md @@ -39,7 +39,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes | 9700001 | Memory operation failed. | | 9700002 | Parcel operation failed. | | 9700003 | System service operation failed. | -| 9700004 | Checking workInfo failed. | +| 9700004 | Check workInfo failed. | | 9700005 | StartWork failed. | @@ -80,7 +80,7 @@ Instructs the **WorkSchedulerService** to stop the specified task. | Name | Type | Mandatory | Description | | ---------- | --------------------- | ---- | ---------- | | work | [WorkInfo](#workinfo) | Yes | Task to stop. | -| needCancel | boolean | Yes | Whether to cancel the task.| +| needCancel | boolean | No | Whether to cancel the task. The default value is **false**.| **Error codes** @@ -91,7 +91,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes | 9700001 | Memory operation failed. | | 9700002 | Parcel operation failed. | | 9700003 | System service operation failed. | -| 9700004 | Checking workInfo failed. | +| 9700004 | Check workInfo failed. | **Example** @@ -118,7 +118,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes } ``` -## workScheduler.getWorkStatus:callback +## workScheduler.getWorkStatus getWorkStatus(workId: number, callback : AsyncCallback\): void Obtains the latest task status. This API uses an asynchronous callback to return the result. @@ -141,7 +141,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes | 9700001 | Memory operation failed. | | 9700002 | Parcel operation failed. | | 9700003 | System service operation failed. | -| 9700004 | Checking workInfo failed. | +| 9700004 | Check workInfo failed. | **Example** @@ -161,7 +161,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes } ``` -## workScheduler.getWorkStatus:promise +## workScheduler.getWorkStatus getWorkStatus(workId: number): Promise\ Obtains the latest task status. This API uses a promise to return the result. @@ -189,7 +189,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes | 9700001 | Memory operation failed. | | 9700002 | Parcel operation failed. | | 9700003 | System service operation failed. | -| 9700004 | Checking workInfo failed. | +| 9700004 | Check workInfo failed. | **Example** @@ -207,7 +207,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes } ``` -## workScheduler.obtainAllWorks:callback +## workScheduler.obtainAllWorks obtainAllWorks(callback : AsyncCallback\): Array\ Obtains all tasks associated with this application. This API uses an asynchronous callback to return the result. @@ -252,8 +252,8 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes } ``` -## workScheduler.obtainAllWorks:promise -obtainAllWorks(): Promise> +## workScheduler.obtainAllWorks +obtainAllWorks(): Promise\> Obtains all tasks associated with this application. This API uses a promise to return the result. @@ -317,7 +317,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes } ``` -## workScheduler.isLastWorkTimeOut:callback +## workScheduler.isLastWorkTimeOut isLastWorkTimeOut(workId: number, callback : AsyncCallback\): boolean Checks whether the last execution of the specified task timed out. This API uses an asynchronous callback to return the result. @@ -346,7 +346,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes | 9700001 | Memory operation failed. | | 9700002 | Parcel operation failed. | | 9700003 | System service operation failed. | -| 9700004 | Checking workInfo failed. | +| 9700004 | Check workInfo failed. | **Example** @@ -364,7 +364,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes } ``` -## workScheduler.isLastWorkTimeOut:promise +## workScheduler.isLastWorkTimeOut isLastWorkTimeOut(workId: number): Promise\ Checks whether the last execution of the specified task timed out. This API uses a promise to return the result. @@ -392,7 +392,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes | 9700001 | Memory operation failed. | | 9700002 | Parcel operation failed. | | 9700003 | System service operation failed. | -| 9700004 | Checking workInfo failed. | +| 9700004 | Check workInfo failed. | **Example** @@ -432,7 +432,7 @@ Provides detailed information about the task. For details about the constraints | isPersisted | boolean | No | Whether to enable persistent storage for the task. | | isDeepIdle | boolean | No | Whether the device needs to enter the idle state. | | idleWaitTime | number | No | Time to wait in the idle state. | -| parameters | {[key: string]: number | string | boolean} | No | Carried parameters. | +| parameters | {[key: string]: number \| string \| boolean} | No | Carried parameters. | ## NetworkType Enumerates the network types that can trigger the task. diff --git a/en/application-dev/reference/errorcodes/errorcode-backgroundTaskMgr.md b/en/application-dev/reference/errorcodes/errorcode-backgroundTaskMgr.md index a92c890358492459fdf13ef213ac3a392628a5b7..d2bd2b2bab4cce2b073012354999b2d2d706c0dd 100644 --- a/en/application-dev/reference/errorcodes/errorcode-backgroundTaskMgr.md +++ b/en/application-dev/reference/errorcodes/errorcode-backgroundTaskMgr.md @@ -38,7 +38,7 @@ Try again later or restart the device. **Error Message** -IPC failed. +Inner transact failed. **Possible Causes** @@ -67,7 +67,7 @@ Try again later or restart the device. **Error Message** -Continuous task verification failed. +Background task verification failed. **Possible Causes** @@ -120,7 +120,7 @@ Task storage failed. **Error Message** -Caller information verification failed for a transient task. +Caller information verification failed. **Possible Causes** @@ -138,7 +138,7 @@ Caller information verification failed for a transient task. **Error Message** -Transient task verification failed. +Background task verification failed. **Possible Causes** @@ -157,7 +157,7 @@ Transient task verification failed. **Error Message** -Caller information verification failed when applying for efficiency resources. +Caller information verification failed. **Possible Causes** diff --git a/en/application-dev/reference/errorcodes/errorcode-workScheduler.md b/en/application-dev/reference/errorcodes/errorcode-workScheduler.md index 34e8a080061c3c7be0c0eb64c0c9bf617ff26d05..24b92da43813930c24a0215744f6130179f58074 100644 --- a/en/application-dev/reference/errorcodes/errorcode-workScheduler.md +++ b/en/application-dev/reference/errorcodes/errorcode-workScheduler.md @@ -53,7 +53,7 @@ Try again later or restart the device. **Error Message** -Checking workInfo failed. +Check workInfo failed. **Possible Causes**