修复bug
This commit is contained in:
@@ -34,6 +34,8 @@ namespace WMS.Web.Domain.QuartzJob
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (DateTime.Now.Hour < 8 || DateTime.Now.Hour > 20) return;
|
if (DateTime.Now.Hour < 8 || DateTime.Now.Hour > 20) return;
|
||||||
|
|
||||||
|
_logger.LogInformation($"同步成品即时库存->开始定时任务");
|
||||||
var result = await _productInventoryService.Refresh();
|
var result = await _productInventoryService.Refresh();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@@ -305,10 +305,10 @@ namespace WMS.Web.Repositories.DependencyInjection
|
|||||||
|
|
||||||
#region 成品即时库存
|
#region 成品即时库存
|
||||||
var jobKey_Inventory = new JobKey("InventoryQuartzJob", options.QuartzJobValue);
|
var jobKey_Inventory = new JobKey("InventoryQuartzJob", options.QuartzJobValue);
|
||||||
q.AddJob<InventoryQuartzJob>(jobKey, j => j.WithDescription("InventoryQuartzJob"));
|
q.AddJob<InventoryQuartzJob>(jobKey_Inventory, j => j.WithDescription("InventoryQuartzJob"));
|
||||||
q.AddTrigger(t => t
|
q.AddTrigger(t => t
|
||||||
.WithIdentity("InventoryQuartzJobTrigger")
|
.WithIdentity("InventoryQuartzJobTrigger")
|
||||||
.ForJob(jobKey)
|
.ForJob(jobKey_Inventory)
|
||||||
.StartNow()
|
.StartNow()
|
||||||
.WithCronSchedule(options.JobStartExpre)
|
.WithCronSchedule(options.JobStartExpre)
|
||||||
//.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(options.JobStartHour[5], options.JobStartMinute[5]))
|
//.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(options.JobStartHour[5], options.JobStartMinute[5]))
|
||||||
|
|||||||
Reference in New Issue
Block a user