Duplicating a schedule
Since a schedule can be associated to only one task or plan, duplicate this schedule to
reuse it with other tasks or plans.
Before you begin
-
Generate access tokens:
- For users, generate a personal access token by following Generating a Personal Access Token.
- For service accounts, generate a service access token by following Generating a service account token.
Once generated, a service account token expires after 30 minutes. If it expires, generate a new token using the POST method at the endpoint https://api.<env>.cloud.talend.com/security/oauth/token. For more information about generating a token, see Generating a service account token.
- You must know the ID of the schedule for which you need to simulate events.
- Ensure that the user or the service account to be used have the View permission for at least one workspace in the environment.
Procedure
Clone the schedule using the following API request:
Example
All triggers are duplicated to the new schedule. The new one is renamed with this naming convention: copy of the original schedule name.
method: POST
endpoint: https://api.<env>.cloud.talend.com/orchestration/schedules/<scheduleId>
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <your_personal_access_token_or_service_account_token>"
}
payload: N/A
Results
Now you can safely perform the following
operations:
- manage changes: clone the schedule assigned to your task or plan, make updates to that copy, simulate events and when ready, unassign the original schedule, assign this copy to your task or plan
- keep schedule versions for rollback or history purposes
- reuse and adapt existing schedules for other tasks or plans