static void Main(string[] args) { using (Deserializer deserilaizer = new Deserializer()) { var _file = Directory.GetCurrentDirectory() + @"\Config.ini"; deserilaizer.Execute(_file); kcopyConfigs = deserilaizer.GetTag("kcopy"); kirokuConfigs = deserilaizer.GetTag("kiroku"); } if (KCopyManager.Initialize(kcopyConfigs, kirokuConfigs)) { Console.WriteLine($"Configs loaded."); if (KCopyManager.Execute()) { Console.WriteLine($"KCopy executed."); } else { Console.WriteLine($"KCopy failed."); } } else { Console.WriteLine($"Configs failed."); } Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("\n\tDEBUG DETECTED, PRESS ANY KEY"); Console.ReadKey(); }
public static void Run([TimerTrigger("0 */5 * * * *")] TimerInfo myTimer, ILogger log) { log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}"); log.LogInformation($"Config Status: {Configuration.ConfigStatus("KCopyApp")}"); try { var result = KCopyManager.Execute(); log.LogInformation($"KCopy Result: {result}"); } catch (Exception ex) { log.LogInformation($"KCopy Exception: {ex.ToString()}"); } }