using System; using System.Threading; namespace sharpknife.Commands { class RecursiveCommand : Command { public int Times { get; set; } public int? Max { get; set; } public override void Execute() { base.Execute(); // Do whatever Debug = "Executing"; Status = StatusCode.Executing; Thread.Sleep(5000); Debug = "Executed"; NextExecution = DateTime.Now.AddSeconds(5); Status = StatusCode.Waiting; } } }