bacgrountTask InstitutionContract some changes
This commit is contained in:
@@ -70,7 +70,7 @@ public class JobSchedulerRegistrator
|
|||||||
var now =DateTime.Now;
|
var now =DateTime.Now;
|
||||||
var endOfMonth = now.ToFarsi().FindeEndOfMonth();
|
var endOfMonth = now.ToFarsi().FindeEndOfMonth();
|
||||||
var endOfMonthGr = endOfMonth.ToGeorgianDateTime();
|
var endOfMonthGr = endOfMonth.ToGeorgianDateTime();
|
||||||
|
_logger.LogInformation("CreateFinancialTransaction job run");
|
||||||
if (now.Date == endOfMonthGr.Date && now.Hour >= 2 && now.Hour < 4 &&
|
if (now.Date == endOfMonthGr.Date && now.Hour >= 2 && now.Hour < 4 &&
|
||||||
now.Date != _lastRunCreateTransaction?.Date)
|
now.Date != _lastRunCreateTransaction?.Date)
|
||||||
{
|
{
|
||||||
@@ -115,7 +115,7 @@ public class JobSchedulerRegistrator
|
|||||||
var now = DateTime.Now;
|
var now = DateTime.Now;
|
||||||
var endOfMonth = now.ToFarsi().FindeEndOfMonth();
|
var endOfMonth = now.ToFarsi().FindeEndOfMonth();
|
||||||
var endOfMonthGr = endOfMonth.ToGeorgianDateTime();
|
var endOfMonthGr = endOfMonth.ToGeorgianDateTime();
|
||||||
|
_logger.LogInformation("SendFirstDayOfMonthSms job run");
|
||||||
if (now.Date == endOfMonthGr.Date && now.Hour >= 10 && now.Hour < 11 &&
|
if (now.Date == endOfMonthGr.Date && now.Hour >= 10 && now.Hour < 11 &&
|
||||||
now.Date != _lastRunSendMonthlySms?.Date)
|
now.Date != _lastRunSendMonthlySms?.Date)
|
||||||
{
|
{
|
||||||
@@ -143,6 +143,7 @@ public class JobSchedulerRegistrator
|
|||||||
[DisableConcurrentExecution(timeoutInSeconds: 1200)]
|
[DisableConcurrentExecution(timeoutInSeconds: 1200)]
|
||||||
public async System.Threading.Tasks.Task SendReminderSms()
|
public async System.Threading.Tasks.Task SendReminderSms()
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation("SendReminderSms job run");
|
||||||
await _institutionContractRepository.SendReminderSmsForBackgroundTask();
|
await _institutionContractRepository.SendReminderSmsForBackgroundTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,6 +154,7 @@ public class JobSchedulerRegistrator
|
|||||||
[DisableConcurrentExecution(timeoutInSeconds: 100)]
|
[DisableConcurrentExecution(timeoutInSeconds: 100)]
|
||||||
public async System.Threading.Tasks.Task SendBlockSms()
|
public async System.Threading.Tasks.Task SendBlockSms()
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation("SendBlockSms job run");
|
||||||
await _institutionContractRepository.SendBlockSmsForBackgroundTask();
|
await _institutionContractRepository.SendBlockSmsForBackgroundTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,6 +166,7 @@ public class JobSchedulerRegistrator
|
|||||||
[DisableConcurrentExecution(timeoutInSeconds: 100)]
|
[DisableConcurrentExecution(timeoutInSeconds: 100)]
|
||||||
public async System.Threading.Tasks.Task SendInstitutionContractConfirmSms()
|
public async System.Threading.Tasks.Task SendInstitutionContractConfirmSms()
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation("SendInstitutionContractConfirmSms job run");
|
||||||
await _institutionContractRepository.SendInstitutionContractConfirmSmsTask();
|
await _institutionContractRepository.SendInstitutionContractConfirmSmsTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Log.Logger = new LoggerConfiguration()
|
|||||||
|
|
||||||
//NO Microsoft Public log
|
//NO Microsoft Public log
|
||||||
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
|
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
|
||||||
|
//.MinimumLevel.Information()
|
||||||
.WriteTo.File(
|
.WriteTo.File(
|
||||||
path: Path.Combine(logDirectory, "institution-contract-log-.txt"),
|
path: Path.Combine(logDirectory, "institution-contract-log-.txt"),
|
||||||
rollingInterval: RollingInterval.Day,
|
rollingInterval: RollingInterval.Day,
|
||||||
|
|||||||
@@ -3476,7 +3476,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
|||||||
public async Task<bool> SendReminderSmsForBackgroundTask()
|
public async Task<bool> SendReminderSmsForBackgroundTask()
|
||||||
{
|
{
|
||||||
var now = DateTime.Now;
|
var now = DateTime.Now;
|
||||||
|
_logger.LogInformation("================>> SendReminderSmsForBackgroundTask job run");
|
||||||
|
|
||||||
// تبدیل تاریخ میلادی به شمسی
|
// تبدیل تاریخ میلادی به شمسی
|
||||||
var persianNow = now.ToFarsi();
|
var persianNow = now.ToFarsi();
|
||||||
|
|||||||
Reference in New Issue
Block a user