I am trying to run the Azure webjob with trigger but my timerjob method is not triggering. I am getting below message.
No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
I am using config.UseTimers() but still showing the message. Not sure what was wrong with below code
static void Main()
{
JobHostConfiguration config = new JobHostConfiguration();
config.UseTimers();
var host = new JobHost(config);
host.RunAndBlock();
}
public static void TimerTrig([TimerTrigger("0 */1 * * * *", RunOnStartup = true)] TimerInfo timer)
{
Console.WriteLine("Triggered");
}
I am using Microsoft.Azure.WebJobs and Microsoft.Azure.WebJobs.Host v2.2.0;