CSharp-Single-EFCore/Bunny.Service/Job/SimpleJob.cs

15 lines
431 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Quartz;
namespace Bunny.Service.Job;
public class SimpleJob : IJob
{
public Task Execute(IJobExecutionContext context)
{
var dataMap = context.JobDetail.JobDataMap;
var username = dataMap.GetString("username");
var password = dataMap.GetString("password");
Console.WriteLine($"SimpleJob用户名{username},密码: {password}");
return Task.CompletedTask;
}
}