When developing a client Connect application, we typically only want jobs to run when we tell them to. This will allow us better control over what is running and when. However, once we move into UAT we should be setting these jobs to run on a schedule so that they can be properly tested by the client.
This document outlines how to accomplish this transition in Connect V3.1
RecurringJobManager.AddSimpleJobRecurringJobManager.AddSimpleJob(() → ProcessOrders(null, CancellationToken.None));Cron.Never()RecurringJobManager.AddSimpleJob(() → ProcessOrders(null, CancellationToken.None), "*/5 * * * *");If the file does not already exist. Create a {{ClientAcronym}}Options.cs file

In the file add a {{JobName}}Cron property for each Job that you have

We can now add this node to our appsettings

We now need to inject these options
Open Client Program.cs and add the options to the dependency injection container in the AddConnectServices method

We can now inject these into the Client JobService class to be used by the service
You may need to add the Microsoft.Extensions.Options Using statement for the page

Now that we have access to the options we can use them in the AddSimpleJob methods
