Hi, there,
I have a C# console app. At the end of the program, I print out "task has ended normally", and then do an Environtment.Exit(0).
But Visual Cron still show it is running long (hours) after even though the log line "task has ended normally" is printed. i can run this app from cmd.exe, it is returns a zero exit code in a few minutes (the normal running time).
static void Main(string[] args)
{
ScenarioPricer myScenarioPricer = new ScenarioPricer();
try
{
myScenarioPricer.Run(args);
log.Info("Scenario Pricing exiting normally.");
Environment.Exit(0); // force exit code of 0. Visual Cron will fail a job even though job finished normally
}
catch( Exception ex )
{
log.Error("Scenario Pricing Failed.", ex);
Environment.Exit(-1);
}
}
Please help!