# Queues and the Scheduler

A **queue** is a list of downloads that run in order, a few at a time. The **Scheduler** starts and stops queues by the clock, and decides what happens when a queue is done.

## Queues

Grabbit comes with two queues:

- **Main download queue** — where **Later**, batch downloads and imported lists go. A download leaves it when it is finished.
- **Synchronization queue** — finished downloads stay in it instead of leaving. It is the only queue that takes finished downloads.

You can add your own queues in the Scheduler, or with **New queue...** in a download's right-click menu.

### Put downloads in a queue

- In **Download file info**, click **Later** and pick the queue.
- Or select downloads in the list, right-click and choose **Add to queue**, then the queue. A download that is already in a queue shows **Move to queue** instead.
- To take a download out of its queue, right-click it and choose **Remove from queue**. The download stays in the list.

The **Q** column shows which downloads are in a queue. Under **Queues** in the categories pane, select a queue to see only its downloads.

### Start and stop a queue

- **Start queue** and **Stop queue** on the toolbar start and stop the **Main download queue**. The arrow next to each button lists every queue.
- **Downloads → Start queue** and **Downloads → Stop queue** list them too.
- Or right-click a queue under **Queues** and choose **Start now** or **Stop**.

A running queue starts its downloads in list order, a few at a time (four by default). When one fails, it moves to the end of the queue and is tried again 30 seconds later. The queue stops when nothing is left to download.

## The Scheduler

Open it with **Scheduler** on the toolbar or **Downloads → Scheduler**. Right-clicking a queue and choosing **Schedule** or **Edit queue** opens it on that queue. It opens in the main window, as a section of [Options](https://humblef0ol.github.io/grabbit/help/options.html) listed under **Tools**, in place of the download list; the toolbar, the paste bar and the status bar stay, and downloads keep running. **← Downloads** (or **Esc**, or **Alt+Left**) goes back to the list.

![The Scheduler: the queues on the left with Download limits, the selected queue's Schedule tab on the right](https://humblef0ol.github.io/grabbit/help/images/help/scheduler.webp)
*1 the queues, 2 Download limits, 3 the queue's schedule, 4 its files.*

The queues are on the left, with **Download limits** below them. The right side shows the selected queue on two tabs, **Schedule** and **Files in the queue**.

- **New queue...** asks for a name and adds a queue. **Delete** removes one of your own queues; the two built-in queues can't be deleted. A deleted queue's downloads stay in the list.
- **Start now** and **Stop**, at the right end of the tabs' row, run or halt the selected queue straight away. **Start now** keeps the Scheduler's changes first.
- **Save**, at the bottom, keeps your changes, and **Discard** throws them away; both are greyed until you change something. Going back with changes not saved asks first whether to discard them (closing the Scheduler window used to keep them).
- **Ctrl+Tab** goes to the next section of Options; click a tab, or use **Left** / **Right** on the selected tab, to switch between **Schedule** and **Files in the queue**.

## Schedule: starting and stopping on time

- **Start download on Grabbit startup** — start the queue whenever Grabbit starts.
- **Start download at** — a time, then either:
  - **Once at** a date, or
  - **Daily**, on the days you tick.
- **Stop download at** — a time to stop the queue if it is still running.
- **Number of retries for each file if downloading failed** — how often a failed download is tried again before the queue gives up on it. Without it, Grabbit keeps trying.

To set a time, click a part of it (hours, minutes, seconds) and use the arrows, the mouse wheel, **Up** / **Down** or the number keys. **Left** and **Right** move between the parts.

Grabbit has to be running for a schedule to fire. It can sit in the tray: closing the main window doesn't quit it.

## Wake the computer to run a queue

Tick **Wake the computer to run this queue**, under the start time, and a computer that is asleep at the start time is woken for it. It needs **Start download at**.

- Grabbit wakes the computer a minute before the start time, so the network is back when the queue starts.
- While the queue runs, the computer doesn't go to sleep. When the queue is done, the computer's own sleep settings apply again: a computer nobody is using goes back to sleep by itself. **Turn off computer when done → Sleep** sends it back to sleep at once.
- The line under the option says when the computer will next be woken, or why it can't be.
- Grabbit has to be running (it can sit in the notification area). The computer has to be asleep, not shut down.
- The wake follows the schedule: change the start time or the days, untick the option or delete the queue, and the wake moves or goes away. Grabbit sets it again each time it starts. Nothing stays behind in the system when Grabbit quits or is uninstalled.

Windows wakes a computer only if its power plan allows wake timers. If it doesn't, the Scheduler says so, and **Change** opens the setting: **Power Options → Change plan settings → Change advanced power settings → Sleep → Allow wake timers**. Choose **Enable**: **Important Wake Timers Only** lets only Windows' own important timers wake the computer. On laptops the setting is often off on battery, so the computer is woken only while plugged in.

## Schedule: when the queue is done

- **Open the following file when done** — for example a sound, a script or a program. **...** picks the file.
- **Hang up modem when done** — ends a dial-up connection, if you use one.
- **Exit Grabbit when done**.
- **Turn off computer when done** — choose **Shut down**, **Sleep** or **Hibernate**.
  - Grabbit first shows a 30-second countdown. **Cancel** stops it; **Turn off now** goes ahead at once.
  - **Force processes to terminate** closes programs that would otherwise hold Windows up.

## Files in the queue

- **Download [N] files at the same time** — how many of the queue's downloads run together. The rest wait their turn.
- The list shows the queue's downloads in the order they will run. The arrow buttons under it move the selected download down or up; the cross takes it out of the queue.

## Download limits

For an internet plan with a data cap, select **Download limits** on the left:

1. Tick **Download limits**.
2. Fill in **Download no more than [N] MB every [H] hours**. It starts at 200 MB every 5 hours.
3. Click **Save**.

When the limit is reached, Grabbit stops downloading. New downloads show **Waiting: the download limit is reached (Scheduler)**. Everything resumes on its own when the period is over. **Show warning before stopping downloads** tells you when this happens and when downloads will go on.

The same setting is in **Options → Connection**. If you change it in both before saving, Options → Connection's change is the one kept.

## Next steps

- [Tutorial: download overnight →](https://humblef0ol.github.io/grabbit/help/guide-download-overnight.html)
- [Keep some speed for everything else →](https://humblef0ol.github.io/grabbit/help/guide-keep-speed-for-everything-else.html)
- [The download list →](https://humblef0ol.github.io/grabbit/help/download-list.html)
