A scheduled job is work an AI does on its own, at set times: check the
planning commission's agenda every morning, file each meeting after it ends,
read new email every hour. A company running GBrain can have its jobs run in
two places, and who catches a problem depends on which one it picks.

## Two places a job can run

| | The workspace runs the job | The company's own AIs run the job |
|---|---|---|
| **Where it runs** | On the workspace's server, in GBrain's cloud | Wherever the company runs its AIs |
| **Who sets the times** | The workspace's **Schedule** | The company's own scheduler |
| **Who sizes the machine** | GBrain | The company, for its own machines. GBrain still runs the server the memory is on |
| **Who sees a failed run** | **Schedule** says so, with what went wrong | The company, in its own systems. GBrain sees only what the AI saved |
| **Who fixes a failed job** | The workspace's own AI, when asked, or GBrain's team on request | The company |
| **Who pays for the thinking** | The workspace's AI credit, or the company's own AI provider account | The company's AI provider |

The plans differ: only a workspace on Team, or on its free start, has an AI
of its own and a **Schedule** page. On Personal, every repeating job runs in an AI the person
connected.

## GBrain keeps the workspace's server running

Every workspace runs on its own server in GBrain's cloud, with 4 GB of
memory, all day. A job runs at its time with every laptop closed.

- **GBrain checks each server every 30 seconds.** A server that fails
  several checks in a row is restarted, then replaced if a restart does not
  bring it back. GBrain's team is emailed within minutes when a workspace
  stops answering, and a person takes over when the automatic steps do not
  work.
- **A server that runs out of memory restarts on its own.** Nothing the
  workspace saved is lost, because the memory is on its disk. The chat says
  what happened and has a **Tell the team** button, and GBrain's team sees
  the workspace on its daily list of workspaces that ran out of memory
  whether or not anyone presses it. [When a workspace runs out of
  memory](/docs/workspace/when-a-workspace-runs-out-of-memory) has the
  details.
- **More memory is decided with you.** GBrain's team can give a workspace a
  bigger server. It changes what the workspace costs to run, so it is agreed
  with the company first. It never happens on its own.
- **A big job runs a few items at a time.** Ask for more than five items and
  the workspace files them a few at a time, each round in a fresh session, so
  one long job does not need a bigger server. A restart costs a round, and
  the next round carries on from where the last one stopped.

## The Schedule page says when a run fails

When a job's last run did not finish, the **Schedule** page puts the job at
the top in a box that says what went wrong and when it runs next. **Ask the
AI to fix it** writes the request in a new chat. Press Send, and the
workspace's own AI reads the runs, changes the job and says what it changed.
A later run that works clears the box, so to look back, open the job: its
page lists its recent runs.

- **A failed run is not repeated at once.** The job runs again at its next
  time, and the box says when that is.
- **A job that keeps failing is stopped,** so it does not keep spending.
  **Stopped** shows in its row. The workspace's AI turns it back on once it
  works.
- **Each run shows what it cost**, when GBrain matched it to its AI calls,
  and says "Not recorded" when it did not. A run that cost three or more times
  the job's usual run is marked.
- **An AI the company connected can check the jobs.** With the workspace's
  **Schedules** permission it can read a job's past runs, change a job and
  run it now.
- **A workspace out of AI credit stops its jobs** until credit is added, and
  each run says so.

[Find out why a scheduled job went wrong](/docs/workspace/debug-a-job) says
what each reason means and what to try. [What a scheduled job
costs](/docs/workspace/what-a-job-costs) explains the numbers.

## What GBrain does not do yet

- **GBrain does not email or text anyone when one job fails.** The failed run
  is on **Schedule** for whoever opens it. An AI the company connected can
  check the schedule on its own timetable, for example every morning.
- **GBrain's team is told when a workspace goes down or runs out of memory,
  not when a single job fails.** If a job keeps failing and the workspace's
  AI cannot fix it, write to
  [support@gbrain.io](mailto:support@gbrain.io) and the team will look at its
  runs.
- **A workspace does not move to a bigger server on its own.** That is
  agreed with the company, as above.

## When the company's own AIs run the jobs

Some companies already run their own AIs on their own schedule, and want
GBrain only as the memory those AIs read and write. Each AI connects to the
workspace, with **Read & Write** on the memory to save, and its scheduler
stays where it is. [Connect an AI](/docs/tools/assistants) has the steps.

The company then looks after:

- **The scheduler**: when each job runs, and running it again when it fails.
- **The machines its AIs run on**: their size, their memory, and keeping them
  on.
- **Noticing a failed run.** A run that never reached the workspace leaves
  nothing in GBrain to see.
- **The AI's thinking**, paid to the company's AI provider.

GBrain still looks after:

- **The workspace and its memory.** The memory those AIs read and write is on
  the workspace's server, so it is checked, restarted and replaced the same
  way as above.
- **The record.** Every action an AI takes in the workspace, its memory
  included, is on [Activity](/docs/tools/activity), under the connection
  that made it.

These jobs are not on **Schedule**, because the workspace did not run them.

## Give each job one home

A company can mix the two, with some jobs in the workspace and some in its
own AIs. Run each job in one place: the same source read in two places costs
twice, and when something goes missing nobody knows where to look. [Where to
run a job that fills the memory](/docs/workspace/where-to-run-a-repeating-job)
helps decide for each job. Questions about a company's setup go to
[support@gbrain.io](mailto:support@gbrain.io).