curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/autoscale-groups/{group_id}/scheduled-policies/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "cron_expression": "0 8 * * 1-5", "target_min_replicas": 3, "target_max_replicas": 10, "name": "Morning", "enabled": true, "timezone_name": "Asia/Kolkata", "duration_seconds": 28800}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/autoscale-groups/{group_id}/scheduled-policies/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "cron_expression": "0 8 * * 1-5", "target_min_replicas": 3, "target_max_replicas": 10, "name": "Morning", "enabled": True, "timezone_name": "Asia/Kolkata", "duration_seconds": 28800, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/autoscale-groups/{group_id}/scheduled-policies/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "cron_expression": "0 8 * * 1-5", "target_min_replicas": 3, "target_max_replicas": 10, "name": "Morning", "enabled": true, "timezone_name": "Asia/Kolkata", "duration_seconds": 28800 }),});console.log(await response.json());Adds a schedule to an Auto Scaling Group. The schedule starts running at once, unless enabled is false. A cron expression that cannot be read is refused and nothing is kept. Needs the permission to create.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Auto Scaling Group ID
Query Parameters
Section titled “Query Parameters”Project ID
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Request Bodyrequired
Section titled “Request Bodyrequired”object
When the schedule runs, as a cron expression read in timezone_name. At most 64 characters. Required.
Example
0 8 * * 1-5Minimum number of VMs the schedule sets. Required, a whole number of at least 1.
Example
3Maximum number of VMs the schedule sets. Required, more than target_min_replicas and at most 60.
Example
10A label for the schedule. At most 128 characters. Default: empty.
Example
Morningfalse creates the schedule paused: it does not run and holds no capacity. Default: true.
Example
trueAny time zone name, such as UTC or Asia/Kolkata. At most 64 characters. Default: UTC.
Example
Asia/KolkataHow long, in seconds, the schedule holds its range before the group goes back to its own. From 60 to 2,592,000 (30 days). Leave it out or send null for a permanent change. Default: null.
Example
28800Responses
Section titled “Responses”Schedule created
object
object
ID of the Auto Scaling Group.
The schedule’s name. Empty when none was sent.
When the schedule runs, as a cron expression.
The time zone cron_expression is read in.
Minimum number of VMs the schedule sets.
Maximum number of VMs the schedule sets.
false when the schedule is paused and does not run.
How long, in seconds, the schedule holds its range before the group goes back to its own. null when the change is permanent.
When the hold that is on now ends. null when the schedule is not holding.
When the schedule runs next. null when it is paused.
When the schedule last ran. null until it has.
object
Example
{ "code": 201, "message": "Created Successfully", "data": { "id": 12, "group_id": 41, "name": "Morning", "cron_expression": "0 8 * * 1-5", "timezone_name": "Asia/Kolkata", "target_min_replicas": 3, "target_max_replicas": 10, "enabled": true, "duration_seconds": 28800, "window_ends_at": null, "next_run_at": "2026-10-22T08:00:00+05:30", "last_run_at": null, "created_at": "2026-10-21T10:02:11+00:00" }, "errors": {}}A field is missing or out of range. errors names the first one found. errors is “Project ID is missing or invalid” when project_id is missing or not a number.
object
object
One of: “cron_expression is required.”, “target_min_replicas must be a positive integer.”, “target_max_replicas must be a positive integer.”, “target_max_replicas must be greater than target_min_replicas.”, “target_max_replicas cannot exceed the platform limit of 60 replicas per group.”, “duration_seconds must be between 60 and 2592000 seconds, or null for a permanent change.”, “duration_seconds must be an integer number of seconds, or null for a permanent change.”, “timezone_name ‘X’ is not a recognized IANA timezone (e.g. ‘UTC’, ‘Asia/Kolkata’).”
Example
{ "code": 400, "message": "Bad Request", "data": {}, "errors": "target_max_replicas must be greater than target_min_replicas."}No Auto Scaling Group with that ID in the project and region.
object
object
Example
{ "code": 404, "message": "Bad Request", "data": {}, "errors": "Autoscale Group not found"}The cron expression could not be read. The schedule is not kept.
object
object
Example
{ "code": 500, "message": "Internal Server Error", "data": "Failed to create schedule: could not parse cron_expression '0 8 * *'.", "errors": {}}