|
@@ -1,6 +1,7 @@
|
|
|
using CMS.Context;
|
|
|
using CMS.Models.Source;
|
|
|
using CMS.Models.Target;
|
|
|
+using Pomelo.AspNetCore.TimedJob;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
@@ -44,8 +45,12 @@ namespace CMS.Services
|
|
|
{
|
|
|
return targetService.Insert(targetExercises);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ /// <summary>
|
|
|
+ /// Begin 起始时间;Interval执行时间间隔,单位是毫秒,建议使用以下格式,此处为6小时;
|
|
|
+ /// SkipWhileExecuting是否等待上一个执行完成,true为等待;
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="services"></param>
|
|
|
+ [Invoke(Begin = "2018-09-21 00:00", Interval = 1000 * 60 * 60 * 1, SkipWhileExecuting = true)]
|
|
|
public bool ETL() {
|
|
|
List<SourceExercise> sourceExercises= ExtractData();
|
|
|
|