# JobShard.TryScheduleJobAsync(ScheduleJobRequest, CancellationToken)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durablejobs/orleans.durablejobs.jobshard/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durablejobs/orleans.durablejobs.jobshard/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.DurableJobs/JobShard.cs#L144-L170)

```csharp
public Task<DurableJob?> TryScheduleJobAsync(ScheduleJobRequest request, CancellationToken cancellationToken)
```

Attempts to schedule a new job on this shard.

### Parameters

- `request` (`ScheduleJobRequest`): The request containing the job scheduling parameters.
- `cancellationToken` (`CancellationToken`): A token to cancel the operation.

### Returns

A task that represents the asynchronous operation. The task result contains the durable job if successful, or null if the job could not be scheduled (e.g., the shard was marked as complete).

### Exceptions

- `System.ArgumentOutOfRangeException`: Thrown when the due time is outside the shard's time range.
