Feb 16 2017 02:59 AM
Hi All,
I have used PnPTimerjob Framework to sync data between two data sources in office365 suite. This job was published to azure webjob and configured to run on recurring basis.
Though job is working as expected, but when I checked the azure webjob logs through kudu, status of each job is shown as failed.
When I checked the logs, it is failed due to job idle timeout after completing all the steps.
Please let me know if there is any flag/status or some piece which I am missing to make the azure webjob as completed.
Sri
Feb 17 2017 01:15 AM
There is an automatic timeout for timer jobs. Depending on your settings and your code, the following could be the cause (not limited to those, but some bullets to check):
Also, here is a more proper way of writing the code - that way it will call your function and then end, not run continously and register a timeout exception:
static void Main(string[] args) { JobHost host = new JobHost(); host.Call(typeof(Program).GetMethod("RunTask")); } [NoAutomaticTrigger] public static void RunTask() { Console.WriteLine("Creating queue message: ", message); }
Feb 21 2017 04:36 AM