> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Agent working hours

Turning on **Working hours** lets an Agent run work during off-peak windows—such as nights and weekends—so your team can take advantage of off-peak AI model pricing and idle Computer capacity without competing with daytime interactive development.

Configure it in Agent settings under **Computer · Runtime · Working directory** in the standalone **Working hours** module (off by default).

## Default off-peak schedule and rules

When you enable **Working hours** for the first time, Sharkly populates an off-peak weekly schedule automatically:

| Days          | Default windows              | Purpose                                                                |
| ------------- | ---------------------------- | ---------------------------------------------------------------------- |
| **Mon – Fri** | `00:00–08:00`, `20:00–24:00` | Runs from 8:00 PM to 8:00 AM on weekdays, avoiding peak daytime hours. |
| **Sat – Sun** | `00:00–24:00`                | Runs all day on weekends to make full use of idle capacity.            |

You can customize the schedule to match your team's hours or model pricing tiers:

- **Per-day toggle**: enable or disable each day of the week independently. Disabled days display the **+ Add range** button on the right so you can add a window and re-enable the day at any time.
- **Up to two windows per day**: set one or two non-overlapping 24-hour `HH:mm` ranges per enabled day (`24:00` marks the end of the day). Use **Add range** (`+`) to add or split a window and **Remove range** (`×`) to delete any window—removing the only window on a day turns that day off and shows **+ Add range**.
- **Time zone**: select the IANA time zone (defaults to your browser time zone, such as `Asia/Shanghai` or `America/Los_Angeles`) used to evaluate every window consistently across teammates.
- **Reset to defaults**: click **Reset to off-peak defaults** at any time to restore the weekday night + all-day weekend schedule.

## Controlled triggers

Use **Controlled triggers** to choose which kinds of incoming work wait for working hours and which still run immediately:

| Trigger                         | Default | Behavior                                                                                                                                             |
| ------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Assigned tasks**              | On      | Creating a Task assigned to this Agent, reassigning a Task to it, or batch-assigning Tasks follows the working-hours schedule.                       |
| **@mentioned in task comments** | On      | Mentioning `@Agent` in a Task comment to request follow-up work follows the working-hours schedule.                                                  |
| **Direct chat**                 | Off     | Sending direct chat messages to the Agent stays immediate by default; turn this on if you also want direct chat messages queued until working hours. |

Unchecked triggers ignore working hours and enqueue immediately at any time.

## Off-hours queuing and Run now

When a controlled trigger fires while **Working hours** is enabled:

1. **Inside a working window**: the run starts right away according to normal Agent and Computer concurrency.
2. **Outside working hours**: Sharkly calculates the start of the next enabled window in the Agent's configured time zone and schedules the run automatically:
   - In a Task conversation, a scheduled banner appears at the top showing the exact start time (for example, `Scheduled to run automatically at 11-10 20:00`).
   - In direct chat (when **Direct chat** is enabled), the queued tray displays the scheduled start time.
3. **Override urgently with Run now**: if a queued item becomes urgent, click **Run now** on the scheduled banner to bypass the off-peak wait for that run without changing the Agent's working-hours configuration.

If you explicitly set a later scheduled start time when assigning a Task, Sharkly preserves the later timestamp (and advances it to the next working window if that timestamp itself falls outside working hours). See [Agent task execution](/docs/agent-and-computer/agent-task-execution.md) for dispatch and queue states.

## Variant inheritance and overrides

[Agent variants](/docs/agent-and-computer/agent-variants.md) inherit the original Agent's working-hours and timeout configuration by default (**Inherited**).

For example, you can keep an original Agent available 24/7 for interactive work while creating an off-peak variant with **Working hours** enabled for backlog cleanup, test coverage, or large refactors. Editing working hours on a variant marks that slice **Overridden**, and **Reset to inherit** restores live sync with the original Agent.

## FAQ

### Will a running Task be stopped when a working window ends?

No. **Working hours** only governs when newly triggered runs start. Once a run has started, it continues to completion even if it runs past the end of the window.

### Does waiting for the next working window count against Queue timeout?

Runs scheduled for a future working window wait until that window opens before entering active dispatch; once the scheduled start time arrives, normal **Queue timeout** and concurrency limits apply. See [Agents](/docs/agent-and-computer/agents.md#run-settings).

### What if the Computer is asleep or offline overnight?

If the Agent runs on a local [Computer](/docs/agent-and-computer/computers.md), keep the machine powered on, prevent automatic system sleep, and leave the local service running during your configured off-peak windows. If the Computer is offline when the window opens, the run stays queued and starts when the Computer reconnects.
