Schedule Policies

Control when tools can be called based on time of day and day of week.

Allowed hours

Restrict access to business hours:

{
  "type": "schedule",
  "config": {
    "allowed_hours": "09:00-17:00",
    "timezone": "America/New_York"
  }
}

Allowed days

Restrict to certain days of the week:

{
  "type": "schedule",
  "config": {
    "allowed_days": ["Mon", "Tue", "Wed", "Thu", "Fri"],
    "timezone": "UTC"
  }
}

Blocked hours

Block access during specific times:

{
  "type": "schedule",
  "config": {
    "blocked_hours": "00:00-06:00",
    "timezone": "America/Los_Angeles"
  }
}

Combined schedule

Business hours on weekdays only:

{
  "type": "schedule",
  "config": {
    "allowed_hours": "08:00-18:00",
    "allowed_days": ["Mon", "Tue", "Wed", "Thu", "Fri"],
    "timezone": "Europe/London"
  }
}

Per-tool schedules

Different schedules for different tools:

{
  "type": "schedule",
  "config": {
    "tool": "deploy_to_production",
    "allowed_hours": "10:00-16:00",
    "blocked_days": ["Fri", "Sat", "Sun"],
    "timezone": "America/New_York"
  }
}

No production deploys on Fridays or weekends, only during business hours.

Timezones

Always specify a timezone. Supported formats:

  • America/New_York
  • Europe/London
  • Asia/Tokyo
  • UTC

See full list.

Example: No 3am deploys

{
  "name": "No late-night deploys",
  "type": "schedule",
  "config": {
    "tools": ["deploy_*", "release_*", "migrate_*"],
    "blocked_hours": "22:00-08:00",
    "timezone": "America/Los_Angeles"
  }
}

Example: Marketing emails

{
  "name": "Marketing hours only",
  "type": "schedule",
  "config": {
    "tool": "send_marketing_email",
    "allowed_hours": "09:00-17:00",
    "allowed_days": ["Mon", "Tue", "Wed", "Thu", "Fri"],
    "timezone": "America/New_York"
  }
}