我的Azure WebJob曾经在VS2015调试器中运行,但我发现它逐渐变得非常间歇,现在根本不会运行.我将其部署到Azure时工作正常.该作业标记为RunOnStartUp.
public class Program
{
static void Main()
{
var config = new JobHostConfiguration();
config.UseTimers();
var host = new JobHost(config);
host.RunAndBlock();
}
}
public class TestJob : BaseJob
{
public static async Task StartupJob([TimerTrigger("05:00:00", RunOnStartup = true)] TimerInfo timerInfo, TextWriter log)
{
log.WriteLine("StartupJob");
await Jobs.Test(some params);
log.WriteLine("Sorted");
}
}
Run Code Online (Sandbox Code Playgroud)
要使它在调试器中运行,我需要做什么?