Skip to content

Commit

Permalink
Fix minor doc grammar and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltoken committed Jan 13, 2025
1 parent e5b8ff6 commit 9e6d0d7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/advanced/dynamic-job-control.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dynamic Job Control
**NCronJob** allows you to dynmically add or remove CRON jobs from the scheduler. This is useful when you want to add jobs at runtime or remove jobs based on some condition without restarting the scheduler.
**NCronJob** allows you to dynamically add or remove CRON jobs from the scheduler. This is useful when you want to add jobs at runtime or remove jobs based on some condition without restarting the scheduler.

## Defining job names
The core idea is to define an unique job name for each job that might be mutated during runtime. The job name is an optional parameter:
Expand Down
4 changes: 2 additions & 2 deletions docs/advanced/global-concurrency.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Global Concurrency
**NCronJob** utilisies a priority queue with a maximum amount of entries. That is, the queue will only hold and execute a maximum amount of jobs at any given time. This is to prevent the system from being overloaded with jobs.
**NCronJob** relies on a priority queue with a maximum amount of entries. That is, the queue will only hold and execute a maximum amount of jobs at any given time. This is to prevent the system from being overloaded with jobs.

## The Maxmimum
## The Maximum
The global maximum of concurrent jobs is calculated as:

```csharp
Expand Down
2 changes: 1 addition & 1 deletion docs/features/instant-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ app.MapPost("/send-email", (RequestDto dto, IInstantJobRegistry jobRegistry) =>
The `RunInstantJob` method takes the job type and the parameters as arguments. Optionally you can pass in a `CancellationToken` as well. The job will be executed immediately.

## Starting a job with a delay
If you find the need of delaying the execution of an instant job, you can use the `RunScheduledJob` method with a `TimeSpan` as a delay. The same as `RunInstantJob` applies here, the job has to be registered in the `AddNCronJob` method.
If you find the need to delay the execution of an instant job, you can use the `RunScheduledJob` method with a `TimeSpan` as a delay. The same as `RunInstantJob` applies here, the job has to be registered in the `AddNCronJob` method.

```csharp
app.MapPost("/send-email", (RequestDto dto, IInstantJobRegistry jobRegistry) =>
Expand Down
4 changes: 2 additions & 2 deletions docs/features/model-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Services.AddNCronJob(options =>
```

## Accessing the state of the parent job
The `JobExecutionContext` object passed to the dependent job contains the output of the parent job. This allows access to the state of the parent job. This can be helpful if information should flow from parent to the child job.
The `JobExecutionContext` object passed to the dependent job contains the output of the parent job. This allows access to the state of the parent job. This can be helpful if information should flow from the parent to the child job.

```csharp
public class JobA : IJob
Expand Down Expand Up @@ -185,4 +185,4 @@ Services.AddNCronJob(options =>
// Register JobC into the container to avoid warnings
options.AddJob<JobC>();
});
```
```
4 changes: 2 additions & 2 deletions docs/features/parameters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Passing parameters to a job

Often times a job needs some kind of configuration or parameter to run. Imagine you have a job that generates a report and can run daily, weekly or monthly. You could create three different jobs for each frequency, but that would be a lot of duplicated code. Instead, you can pass in parameters to the job.
Often a job needs some kind of configuration or parameter to run. Imagine you have a job that generates a report and can run daily, weekly or monthly. You could create three different jobs for each frequency, but that would be a lot of duplicated code. Instead, you can pass in parameters to the job.

```csharp
Services.AddNCronJob(options =>
Expand Down Expand Up @@ -44,7 +44,7 @@ public class ReportJob : IJob
```

## Parameters are not immutable
Passed in parameters are not immutable by default or cloned through out the job execution. This means that if you change the parameter in the job, it will also change in the next execution. If you need to keep the parameter unchanged, you should clone it in the job.
Passed in parameters are not immutable by default or cloned throughout the job execution. This means that if you change the parameter in the job, it will also change in the next execution. If you need to keep the parameter unchanged, you should clone it in the job.

```csharp
public class MyParameter
Expand Down

0 comments on commit 9e6d0d7

Please sign in to comment.