change cron timezone

This commit is contained in:
Suphonchai Phoonsawat 2025-03-07 15:04:55 +07:00
parent 11c84e0013
commit 22f4fce080

View file

@ -167,7 +167,7 @@ var app = builder.Build();
var manager = new RecurringJobManager();
if (manager != null)
{
manager.AddOrUpdate("ปรับปรุงรอบการลงเวลาทำงาน", Job.FromExpression<UserDutyTimeRepository>(x => x.UpdateUserDutyTime()), Cron.Daily(1, 0), TimeZoneInfo.Local);
manager.AddOrUpdate("ปรับปรุงรอบการลงเวลาทำงาน", Job.FromExpression<UserDutyTimeRepository>(x => x.UpdateUserDutyTime()), "0 1 * * *", TimeZoneInfo.FindSystemTimeZoneById("Asia/Bangkok"));
}
// apply migrations