Outcome
By the end of this lesson, you will be able to attach resources and groups to a schedule and explain why exclusive membership is enforced.
| Prerequisites | L1-L4, M1.2 |
| Time | 10 minutes |
1. Concept
A schedule on its own changes nothing at all.
It describes when: the crons and the timezone. Attaching is what says to what. Until something is attached, it is a set of times with nothing to act on.
There are two ways to attach: one resource at a time, or a whole group at once.
Per-resource attachment
Attach a schedule directly to a specific resource:
1. Open the resource (Resources → click row)2. In the Schedules tab of the detail panel, click "+ Attach Schedule" ("+ Attach" if it already has one)3. Pick the schedule from the dropdown. It attaches at once: there is no Save stepThe resource now follows the schedule’s hours. Attaching one at a time is right for:
- A one-off, where a single resource needs hours nothing else shares
- Resources that don’t belong to a group
- Initial pilot before scaling up to groups
Attaching many resources at once
To attach many resources at once, open the schedule and use its resource picker:
1. Schedules → open the schedule2. Under Attached Resources, click "+ Attach"3. In the Attach Resources drawer, search and filter to the target set4. Tick the checkbox on each resource you want5. Click "Attach N Selected" and confirmThe Inventory page selection banner only starts and stops; it does not attach schedules. A resource that belongs to a group cannot be picked here: the picker tells you to attach the schedule to the group instead.
Per-group attachment
For repeated scheduling at scale, attach the schedule to a group (covered fully in M1.4):
1. Open Resource Groups2. Open the target group3. In the Schedule card, click "+ Attach"4. In the Attach Schedule drawer, click "Attach" beside the schedule. It attaches at once: there is no Save stepNow every member of the group follows the schedule. Adding or removing resources from the group changes who the schedule affects: the schedule attachment doesn’t need to be re-managed.
Exclusive membership
A resource can be attached to at most one schedule at a time. This is the exclusive membership rule.
Why exclusive: two schedules on one resource can conflict. Schedule A says “start at 8 AM”; Schedule B says “start at 10 AM.” Which wins? Resolving this would require precedence rules, last-write-wins, or some user-visible “primary schedule” concept: all of which introduce confusion. The product choice is simpler: one schedule per resource, attached explicitly.
If a user attempts to attach a resource that’s already attached to another schedule, the attach is rejected with an error:
resource is already attached to schedule "Old Schedule"There is no replace step. To move the resource, detach it from the old schedule first, then attach it to the new one. Silent override is not possible.
The same applies to group members. A resource that belongs to a group cannot be attached to a schedule on its own: the error tells you to attach the schedule to the group instead.
Group exclusivity
Groups have the same rule: a resource can be in at most one group. Two groups cannot share a resource. The exclusivity simplifies sequenced execution (see M1.4) and prevents the “two groups’ schedules both fire” ambiguity.
The Attach Resources drawer
When attaching resources to a schedule, the Attach Resources drawer gives you a search box and four filters:
ATTACH RESOURCES─────────────────────────────────────────────────[Search resources...]
[All Cloud Accounts ▾] [All Statuses ▾] [All Types ▾] [All Regions ▾]
─────────────────────────────────────────────────[ ] dev-api-1 (ec2) us-east-1[ ] dev-postgres-1 (rds) us-east-1[ ] dev-postgres-2 (rds) us-east-1[-] dev-worker-1 (ec2) [group: dev-env] (greyed out)...
[Attach 3 Selected]Resources already on this schedule are left out of the list. Resources that belong to a group still appear, but greyed out with the group’s name, and you cannot tick them: attach the schedule to the group instead. There is no “Select all”: tick each resource you want, and the button counts them for you.
The account and type filters work the same way as on the Resources page (M1.2 L3). A team can narrow the list to “running databases in one region”, tick the ones it wants and attach them in one action.
Detach
Detaching a resource from a schedule is symmetric:
1. Open the resource or open the schedule2. On the resource, click the detach icon beside the schedule under "Schedules". On the schedule, click "Detach Resource" on the resource's row.3. Confirm4. The resource is now unattached. Future cron firings will not act on it.Detaching does NOT change the resource’s current state. If the resource was running at the time of detach, it stays running. The schedule simply no longer manages it.
Group attachment vs. resource attachment: which to use
SCENARIO USE─────────────────────────────────────────────────────────────A single resource needs its own hours Per-resourceA small set (<10) of one-off resources Per-resource (picker)A team's full dev environment Group (M1.4)Resources that share lifecycle dependencies Group (M1.4): sequencingCross-team shared infrastructure Per-resource (no obvious group)Changing membership over time Group: the schedule attachment stays stable even as members changeFor most production deployments, groups are the right scaling pattern. Individual resource attachment is for the long tail.
2. Demo
A team’s first schedule rollout:
DAY 1, T+0 Schedule "non-prod-business-hours" exists but empty.
T+5 min Open the schedule.T+5 min Under Attached Resources, click "+ Attach."T+6 min In the drawer, apply filters: Types: Compute, Kubernetes, Database Search: dev (matches name, UID or tags) Status: RunningT+7 min Result: 24 resources.T+8 min Tick each of the 24 → click "Attach 24 Selected."T+8 min Confirmation modal "Attach Resources": "Are you sure you want to attach the following resources to this schedule?"T+9 min Confirm.T+10 min 24 resources now attached.
DAY 1, EVENING 8 PM hits. Cron #2 fires. 24 resources begin to stop.
DAY 2, MORNING 8 AM hits. Cron #1 fires. 24 resources begin to start. By 8:15 AM, 23 are running. 1 had an error (logged for investigation: likely transient, will retry next firing).
DAY 7 Realized savings: $490 for the week. Annual run-rate: about $25K.Ten minutes to set up. About $25K a year in savings without anyone starting or stopping a thing by hand. For hundreds of resources, put them in a group and attach the schedule once (M1.4) instead of ticking each row.
3. Hands-on (6 min)
Attach resources to your test schedule from L1:
1. Open the schedule.2. Under Attached Resources, click "+ Attach."3. Filter to a small, safe test set (a sandbox environment, 3-5 resources max).4. Verify the filters: make sure no production resources are in the result set.5. Tick each resource → "Attach N Selected."6. Confirm.7. Verify on the schedule detail page that the resources are listed.
THEN: wait for the schedule to fire (or trigger the next firing manuallyif you can adjust the cron). Confirm that the start/stop actions happenas expected on the attached resources.Do it through MCP. The same task you just did in the console, asked in one sentence.
BEFORE A ZopNight account with one cloud connected. At least two resources you are free to stop: EC2 instances, Compute Engine VMs, Azure Virtual Machines, or a non-prod RDS or Cloud SQL instance.ASK "Attach my sandbox instances to the nightly schedule, then tell me whether it has fired."CHECK the schedule detail page lists the same resources the assistant reports back.Tools behind it: attach_resource_to_schedule (write, tier 2, reversible), get_schedule (read, Operate), get_schedule_success (read, Cost). Connection details are in the MCP integration docs.
4. Knowledge check
Q1
A resource is currently attached to schedule A. A user tries to attach the same resource to schedule B. What happens?
A. The UI offers to replace schedule A with schedule B
B. Both schedules attach to the same resource at once
C. It is rejected with an error naming schedule A
D. Schedule B becomes a backup
Show answer
Correct: C. Exclusive membership is the rule: one schedule per resource. There is no replace flow: detach from schedule A first, then attach to schedule B.
Q2
A team detaches a resource from its schedule. The resource is currently running. What happens to the resource’s state?
A. Stops immediately
B. It resets back to the org default schedule again
C. Restarts
D. Nothing: detach does not change the current state
Show answer
Correct: D. The resource stays running until manually stopped or until a different schedule starts managing it. Detach is a metadata operation. It does not act on the resource’s current state. The schedule simply no longer manages future state transitions.
Q3
For a team’s 47-resource non-prod environment, the best attachment strategy is:
A. Per-resource attach (47 individual attachments picked in the schedule’s resource picker instead of a group)
B. Per-group attach; create a Resource Group for the environment, add the 47 resources, attach the schedule to the group
C. Either works equally
D. Per-resource is faster
Show answer
Correct: B. Stable as membership changes. Groups are the scaling pattern for stable membership. Adding or removing one resource from the environment doesn’t require re-attaching the schedule. (See M1.4 for groups in detail.)
5. Apply
Attachment lives in two surfaces:
- Schedule detail page → ”+ Attach” under Attached Resources or Attached Groups
- Resource detail panel → ”+ Attach Schedule” in the Schedules tab (”+ Attach” once a schedule is already attached)
For groups (the recommended pattern at scale), see M1.4: Resource Groups.
Related lessons
Glossary terms touched
Schedule · Exclusive membership · Group attachment