|
@@ -26,41 +26,41 @@ namespace MySystem
|
|
|
}
|
|
|
public void StartFor()
|
|
|
{
|
|
|
- // while (true)
|
|
|
- // {
|
|
|
- // if(DateTime.Now.Hour > 13 && DateTime.Now.Hour < 23)
|
|
|
- // {
|
|
|
- // string today = DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
- // string checkFlag = function.ReadInstance("/RecommandKing/" + today + ".txt");
|
|
|
- // if(string.IsNullOrEmpty(checkFlag))
|
|
|
- // {
|
|
|
- // function.WritePage("/RecommandKing/", today + ".txt", DateTime.Now.ToString());
|
|
|
-
|
|
|
- // if(DateTime.Now.Day == 2)
|
|
|
- // {
|
|
|
- // Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 1);
|
|
|
- // Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 2);
|
|
|
- // // Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 3);
|
|
|
- // }
|
|
|
- // Recommend(DateTime.Now.ToString("yyyyMM"), 1);
|
|
|
- // Recommend(DateTime.Now.ToString("yyyyMM"), 2);
|
|
|
- // // Recommend(DateTime.Now.ToString("yyyyMM"), 3);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // Thread.Sleep(600000);
|
|
|
- // }
|
|
|
- string today = DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
- string checkFlag = function.ReadInstance("/RecommandKing/" + today + ".txt");
|
|
|
- if(string.IsNullOrEmpty(checkFlag))
|
|
|
+ while (true)
|
|
|
{
|
|
|
- function.WritePage("/RecommandKing/", today + ".txt", DateTime.Now.ToString());
|
|
|
- Recommend(DateTime.Now.AddMonths(-2).ToString("yyyyMM"), 1);
|
|
|
- Recommend(DateTime.Now.AddMonths(-2).ToString("yyyyMM"), 2);
|
|
|
- Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 1);
|
|
|
- Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 2);
|
|
|
- Recommend(DateTime.Now.ToString("yyyyMM"), 1);
|
|
|
- Recommend(DateTime.Now.ToString("yyyyMM"), 2);
|
|
|
+ if(DateTime.Now.Hour > 13 && DateTime.Now.Hour < 23)
|
|
|
+ {
|
|
|
+ string today = DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
+ string checkFlag = function.ReadInstance("/RecommandKing/" + today + ".txt");
|
|
|
+ if(string.IsNullOrEmpty(checkFlag))
|
|
|
+ {
|
|
|
+ function.WritePage("/RecommandKing/", today + ".txt", DateTime.Now.ToString());
|
|
|
+
|
|
|
+ if(DateTime.Now.Day == 2)
|
|
|
+ {
|
|
|
+ Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 1);
|
|
|
+ Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 2);
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 3);
|
|
|
+ }
|
|
|
+ Recommend(DateTime.Now.ToString("yyyyMM"), 1);
|
|
|
+ Recommend(DateTime.Now.ToString("yyyyMM"), 2);
|
|
|
+ // Recommend(DateTime.Now.ToString("yyyyMM"), 3);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Thread.Sleep(600000);
|
|
|
}
|
|
|
+ // string today = DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
+ // string checkFlag = function.ReadInstance("/RecommandKing/" + today + ".txt");
|
|
|
+ // if(string.IsNullOrEmpty(checkFlag))
|
|
|
+ // {
|
|
|
+ // function.WritePage("/RecommandKing/", today + ".txt", DateTime.Now.ToString());
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-2).ToString("yyyyMM"), 1);
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-2).ToString("yyyyMM"), 2);
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 1);
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 2);
|
|
|
+ // Recommend(DateTime.Now.ToString("yyyyMM"), 1);
|
|
|
+ // Recommend(DateTime.Now.ToString("yyyyMM"), 2);
|
|
|
+ // }
|
|
|
}
|
|
|
public void Recommend(string TradeMonth, int Kind)
|
|
|
{
|