初始化

This commit is contained in:
2025-11-21 08:48:01 +08:00
commit b4d684a84c
202 changed files with 28585 additions and 0 deletions

43
回收/Program.cs Normal file
View File

@@ -0,0 +1,43 @@
using System.Timers;
using CliWrap;
using CliWrap.Buffered;
using Common;
namespace
{
internal class Program
{
public static System.Timers.Timer timer;
async static Task Main(string[] args)
{
timer = new System.Timers.Timer();
timer.Elapsed += Timer_Elapsed;
timer.Interval = 20000;
timer.Start();
Console.ReadLine();
}
static void Timer_Elapsed(object? sender, ElapsedEventArgs e)
{
try
{
Console.WriteLine("go...");
string Key = "IISRecycle";
int isnew = CSRedisCacheHelper.redis3.Get<int>(Key);
if (isnew == 1)
{
Console.WriteLine("回收了");
var cmd = Cli.Wrap("1.cmd")
.WithWorkingDirectory("D:\\BLW_Data\\cricsSQL")
.ExecuteBufferedAsync();
CSRedisCacheHelper.redis3.Set(Key, 0);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}