Create Schedules
Overview
In OneLens, you can create Schedules to automate routine resource management tasks and avoid unnecessary manual effort. Each OneLens schedule allows you to specify:
Which service and resources the schedule applies to
What action should be performed (start, stop, or scale)
When and how often the action should run (daily, weekly, or monthly)
Once you understand the value of schedules, the next step is to learn how to set one up inside OneLens.
Steps to Create
Here’s how you can create a schedule in OneLens:
Head to Schedulers
Log in to the OneLens UI.
From the right sidebar, click Schedulers.
Note
If you haven’t installed the Scheduler yet, you’ll see the Getting Started with Scheduler page. To continue, follow the Scheduler Installation Guide.
Choose Target Scope
You decide which resources the schedule applies to by:
a) Using Expression-Based Rules
Add rules by choosing a field, an operator, and a value.
Available Fields: Account, Region, Tags.
Combine multiple rules with valid operators.
Valid operators:
AND
,(
,)
.
Business Usecase
Imagine you want to optimize non-critical workloads in different environments by automatically shutting them down during off-hours. You decide to use expression-based rules to precisely target the right set of resources across multiple accounts and regions.
You create the following rules:
Rule 1: Account =
Account-1
Rule 2: Region =
us-east-1
Rule 3: Account =
Account-2
Rule 4: Region =
us-west-2
Rule 5: Tag =
non-prod
The expression looks like:
(1 AND 2) AND (3 AND 4 AND 5)
Here’s how it works:
Group 1 (1 AND 2): Targets all resources in Account-1 that are located in us-east-1.
Group 2 (3 AND 4 AND 5): Targets all resources in Account-2, within us-east-3, and tagged as non-prod.
The scheduler now applies to both groups of resources. That means during off-hours, it will stop all workloads from Group 1 and Group 2, ensuring cost savings without impacting production-critical services.
b) Using Resource ID
Click Add Resource and enter the ARN of a resource, or
Upload a CSV file with multiple ARNs.
Note: You can add up to 50 resources only.
Add Schedule Actions
Once the schedule is created, you can define what action should take place:
Click on Add Action.
A configuration box appears where you need to define:
Action Type
The available action types vary depending on the service:
EC2 → Start or Stop Instance
RDS → Start or Stop Resource
Auto Scaling Group (ASG) → Modify Resource
Action Recurrence
Define how often the action should run:
Daily → Choose excluded days
Weekly → Select the day(s) of the week
Monthly → Select the day of the month
Time of the Day (UTC)
Set the exact hour and minute when the action should be executed.
Click on Add Action.
Note
You can add multiple actions under a single schedule. However, ensure that the timing of each action does not collide, as overlapping schedules may cause conflicts in resource management.
After you’ve created schedules, head to your Schedulers Dashboard to monitor and manage them in one place.
Last updated