Activate targeting rules based on date ranges, day-of-week, and time-of-day windows for time-sensitive feature releases
Scheduled Rules
Scheduled rules let you control when a targeting rule is active. Attach a schedule to any targeting rule to gate it by date range, day of week, or time of day — no manual flag toggling required.
How Schedules Work
When a targeting rule has a schedule, Flaggr checks the schedule before evaluating the rule's conditions. If the current time is outside the schedule window, the rule is skipped entirely and evaluation continues to the next rule.
For each targeting rule:
1. Is there a schedule? → Check if we're within the window
2. If outside schedule → Skip this rule
3. If within schedule (or no schedule) → Evaluate conditions normally
Schedule Properties
| Property | Type | Description |
|---|---|---|
startDate | string (ISO 8601) | Rule activates on or after this date |
endDate | string (ISO 8601) | Rule deactivates after this date |
timezone | string | IANA timezone (e.g., America/New_York). Default: UTC |
recurrence | object | Recurring schedule within the date range |
recurrence.type | daily | weekly | cron | Recurrence pattern type |
recurrence.daysOfWeek | number[] | Days active (0=Sunday, 6=Saturday). Weekly only. |
recurrence.startTime | string | Start time in HH:MM format |
recurrence.endTime | string | End time in HH:MM format |
Date Range Schedules
The simplest schedule restricts a rule to a date range:
Launch Window
{
"targeting": [
{
"id": "black-friday-sale",
"conditions": [
{ "property": "region", "operator": "in", "value": ["US", "CA", "UK"] }
],
"value": true,
"schedule": {
"startDate": "2026-11-27T00:00:00Z",
"endDate": "2026-11-30T23:59:59Z"
}
}
]
}This rule only activates during Black Friday weekend. Before and after that window, the rule is skipped.
Future Release
{
"schedule": {
"startDate": "2026-03-15T09:00:00Z"
}
}No end date — the rule activates on March 15 and stays active indefinitely.
Sunset Date
{
"schedule": {
"endDate": "2026-06-30T23:59:59Z"
}
}No start date — the rule is active now but automatically deactivates at the end of June.
Recurring Schedules
Weekdays Only
{
"schedule": {
"recurrence": {
"type": "weekly",
"daysOfWeek": [1, 2, 3, 4, 5]
}
}
}Active Monday through Friday, every week. Days use JavaScript convention: 0=Sunday, 6=Saturday.
Weekend Feature
{
"schedule": {
"recurrence": {
"type": "weekly",
"daysOfWeek": [0, 6]
}
}
}Business Hours
{
"schedule": {
"recurrence": {
"type": "daily",
"startTime": "09:00",
"endTime": "17:00"
}
}
}Active from 9 AM to 5 PM every day. Times are in 24-hour HH:MM format.
Overnight Windows
Schedules support overnight time ranges where the end time is before the start time:
{
"schedule": {
"recurrence": {
"type": "daily",
"startTime": "22:00",
"endTime": "06:00"
}
}
}Active from 10 PM to 6 AM. This is useful for maintenance windows or overnight feature testing.
Combined Schedules
Combine date ranges with recurrence for precise control:
Business Hours During Launch Week
{
"schedule": {
"startDate": "2026-03-15T00:00:00Z",
"endDate": "2026-03-21T23:59:59Z",
"recurrence": {
"type": "weekly",
"daysOfWeek": [1, 2, 3, 4, 5],
"startTime": "09:00",
"endTime": "18:00"
}
}
}This rule is only active during business hours (9–6), on weekdays, during the week of March 15–21, 2026.
Multiple Scheduled Rules
You can have multiple rules with different schedules on the same flag. Rules are evaluated in order, so a scheduled rule that's outside its window simply gets skipped:
{
"targeting": [
{
"id": "weekend-promotion",
"conditions": [{ "property": "plan", "operator": "not_equals", "value": "free" }],
"value": { "banner": "Weekend Special!", "discount": 20 },
"schedule": {
"recurrence": { "type": "weekly", "daysOfWeek": [0, 6] }
}
},
{
"id": "weekday-default",
"conditions": [{ "property": "plan", "operator": "not_equals", "value": "free" }],
"value": { "banner": "Welcome back!", "discount": 0 }
}
]
}On weekends, paying users see the promotion. On weekdays, the weekend rule is skipped and the default rule matches.
Scheduled Rules with Overrides
Overrides take priority over scheduled rules. If a user has an override, they get the override value regardless of schedule windows:
{
"overrides": [
{ "name": "Always-on for QA", "identifiers": ["qa-1"], "value": true, "priority": 10 }
],
"targeting": [
{
"id": "launch-day",
"conditions": [...],
"value": true,
"schedule": { "startDate": "2026-03-15T09:00:00Z" }
}
]
}User qa-1 sees the feature before the launch date via the override.
Use Cases
| Use Case | Schedule Configuration |
|---|---|
| Product launch | startDate set to launch time |
| Limited-time promotion | startDate + endDate |
| Feature sunset | endDate only |
| Business hours only | Daily recurrence with startTime/endTime |
| Weekday rollout | Weekly recurrence with daysOfWeek: [1,2,3,4,5] |
| Maintenance window | Overnight time range (22:00–06:00) |
| Seasonal feature | Date range + weekly recurrence |
Best Practices
- Always use UTC dates in the schedule — this avoids ambiguity across timezones
- Test with time manipulation — verify your schedule windows work before relying on them
- Combine schedules with targeting — a schedule gates when, conditions gate who
- Use date ranges for one-time events and recurrence for repeating patterns
- Don't rely solely on schedules for critical launches — have a manual kill switch too
- Set both start and end dates for promotions to avoid features staying active indefinitely
Related
- Targeting Rules — Conditions, operators, and evaluation order
- Overrides & Prerequisites — Identity overrides and flag dependencies
- Progressive Rollouts — Staged deployment with safety checks