update block sms method

This commit is contained in:
SamSys
2025-11-20 11:37:04 +03:30
parent d31cf8470f
commit 3ed14bf2bd
2 changed files with 50 additions and 39 deletions

View File

@@ -25,23 +25,23 @@ public class JobSchedulerRegistrator
public void Register()
{
//RecurringJob.AddOrUpdate(
// "InstitutionContract.CreateFinancialTransaction",
// () => CreateFinancialTransaction(),
// "*/30 * * * *" // هر 30 دقیقه یکبار چک کن
//);
RecurringJob.AddOrUpdate(
"InstitutionContract.CreateFinancialTransaction",
() => CreateFinancialTransaction(),
"*/30 * * * *" // هر 30 دقیقه یکبار چک کن
);
//RecurringJob.AddOrUpdate(
// "InstitutionContract.SendMonthlySms",
// () => SendMonthlySms(),
// "*/20 * * * *" // هر 30 دقیقه یکبار چک کن
//);
RecurringJob.AddOrUpdate(
"InstitutionContract.SendMonthlySms",
() => SendFirstDayOfMonthSms(),
"*/20 * * * *" // هر 30 دقیقه یکبار چک کن
);
//RecurringJob.AddOrUpdate(
// "InstitutionContract.SendReminderSms",
// () => SendReminderSms(),
// "*/1 * * * *" // هر 1 دقیقه یکبار چک کن
//);
RecurringJob.AddOrUpdate(
"InstitutionContract.SendReminderSms",
() => SendReminderSms(),
"*/1 * * * *" // هر 1 دقیقه یکبار چک کن
);
RecurringJob.AddOrUpdate(
"InstitutionContract.SendBlockSms",
() => SendBlockSms(),
@@ -98,8 +98,8 @@ public class JobSchedulerRegistrator
/// ارسال پیامک صورت حساب ماهانه
/// </summary>
/// <returns></returns>
[DisableConcurrentExecution(timeoutInSeconds: 1000)]
public async System.Threading.Tasks.Task SendMonthlySms()
[DisableConcurrentExecution(timeoutInSeconds: 600)]
public async System.Threading.Tasks.Task SendFirstDayOfMonthSms()
{
//var now = new DateTime(2025,11,21, 10,30,0);
var now = DateTime.Now;