question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TimerTrigger for every 15 minutes throws exceptions

See original GitHub issue

I have created the timer trigger webjob using webjob extenstions which is scheduled to run on every 15 mins,

I have published the webjob using visual studio publish method,

but i get following error, can you please help…

Function ‘SampleHost.Functions.ProcessEvents’ updated status: Last=‘2018-10-24T10:00:00.0391190+00:00’, Next=‘2018-10-24T10:15:00.0000000+00:00’, LastUpdated=‘2018-10-24T10:00:00.0391190+00:00’ [10/24/2018 10:04:01 > d35386: ERR ] Command ‘cmd /c ““run.cmd””’ was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed. cmd /c ““run.cmd”” [10/24/2018 10:04:01 > d35386: SYS INFO] Status changed to Failed [10/24/2018 10:04:01 > d35386: SYS ERR ] System.AggregateException: One or more errors occurred. —> Kudu.Core.Infrastructure.CommandLineException: Command ‘cmd /c ““run.cmd””’ was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed. cmd /c ““run.cmd”” at Kudu.Core.Infrastructure.IdleManager.WaitForExit(IProcess process) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\IdleManager.cs:line 45 at Kudu.Core.Infrastructure.ProcessExtensions.<Start>d__12.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\ProcessExtensions.cs:line 212 — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Kudu.Core.Infrastructure.Executable.<ExecuteAsync>d__31.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 255 — End of inner exception stack trace — at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result() at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func2 onWriteOutput, Func2 onWriteError, Encoding encoding, String arguments, Object[] args) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 216 at Kudu.Core.Infrastructure.Executable.ExecuteReturnExitCode(ITracer tracer, Action1 onWriteOutput, Action1 onWriteError, String arguments, Object[] args) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 165 at Kudu.Core.Jobs.BaseJobRunner.RunJobInstance(JobBase job, IJobLogger logger, String runId, String trigger, ITracer tracer, Int32 port) in C:\Kudu Files\Private\src\master\Kudu.Core\Jobs\BaseJobRunner.cs:line 272 —> (Inner Exception #0) ExitCode: -1, Output: Command ‘cmd /c ““run.cmd””’ was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed., Error: Command ‘cmd /c ““run.cmd””’ was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed., Kudu.Core.Infrastructure.CommandLineException: Command ‘cmd /c ““run.cmd””’ was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed. cmd /c ““run.cmd”” at Kudu.Core.Infrastructure.IdleManager.WaitForExit(IProcess process) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\IdleManager.cs:line 45 at Kudu.Core.Infrastructure.ProcessExtensions.<Start>d__12.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\ProcessExtensions.cs:line 212 — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Kudu.Core.Infrastructure.Executable.<ExecuteAsync>d__31.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 255<—

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:19

github_iconTop GitHub Comments

2reactions
luizs81commented, Jul 5, 2021

For triggered jobs try to replace

host.Run(); by host.Start();

in your Program.cs, it worked for me.

This is definitely the correct approach. I didn’t need to change my WebJob to Continuous and it did not throw the time out exception. Thanks for posting this.

2reactions
pawodcommented, Aug 24, 2020

For triggered jobs try to replace

host.Run(); by host.Start();

in your Program.cs, it worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handle exceptions in Azure timer functions
I have a timer function that runs every 15 minutes (pseudo-code below). Due to a vendor issue in the 3rd party service, we...
Read more >
Timer trigger for Azure Functions
Understand how to use timer triggers in Azure Functions. ... C# function that executes each time the minutes have a value divisible by...
Read more >
Timer Trigger Azure Functions: handling retry policies
Let's check the Timer Trigger definition. It executes every 1 minute and I have define a FixedDelayRetry policy with infinite retry (-1) and ......
Read more >
Run an Azure Function Every 15 minutes - appsloveworld.com
There is no problem with the timer trigger. Your function is triggered every 15 minutes successfully, but the log window is fragile.
Read more >
How to Automate Scheduled Tasks using Isolated-Mode ...
This CRON expression translates to “Run the Timer Trigger function at 10th second of every 5th minute of every hour between day 15...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found