You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: src/pages/jobs.mdx
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Job definitions are defined as a part of batches and represent a single unit of
18
18
19
19
A Job is an instance of a Job Definition that is running within a `Batch`, these can be created from Nitric services or other Nitric batches.
20
20
21
-
## Limitations of Jobs
21
+
## Limitations of Batches
22
22
23
23
Jobs are designed to be long running HPC workloads and can take some time to spin up. They are not designed with reactivity in mind and are not suitable for responding to events from cloud resources.
24
24
@@ -31,8 +31,22 @@ Jobs are unable to run the following:
31
31
32
32
Jobs can be used to read and write to/from all nitric resources.
33
33
34
+
## Defining Batches
35
+
36
+
Batches are defined in a similar way to services, within the `nitric.yaml` file. As an example
37
+
38
+
```yaml
39
+
batches:
40
+
- match: ./batches/*.ts
41
+
start: yarn dev:batches $BATCH_PATH
42
+
```
43
+
44
+
> A Batch can contain any number of Job Definitions.
45
+
34
46
## Defining a Job
35
47
48
+
Within a Batch we define Job Definitions, which describes the code we will execute in each job.
0 commit comments