Skip to content

Commit 182bbf6

Browse files
committed
StartupContext is not required for scheduled jobs
1 parent faed558 commit 182bbf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Foundatio.Extensions.Hosting/Jobs/ScheduledJobService.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public ScheduledJobService(IServiceProvider serviceProvider, ILoggerFactory logg
3232

3333
protected override async Task ExecuteAsync(CancellationToken stoppingToken) {
3434
// TODO: Add more logging throughout
35-
var startupContext = _serviceProvider.GetRequiredService<StartupActionsContext>();
35+
var startupContext = _serviceProvider.GetService<StartupActionsContext>();
3636
if (startupContext != null) {
3737
var result = await startupContext.WaitForStartupAsync(stoppingToken).AnyContext();
3838
if (!result.Success) {

0 commit comments

Comments
 (0)