1

I have an Azure timer trigger webjob, deployed in two different environments with two different storage accounts. The webjobs have been deployed for about two months now, and were running as expected for quite some time. However, for about a week now, the function is being recognised but not being executed.

Here is how the logs look:

Found the following functions:
ADFSchedulerWebJob.Functions.ProcessTimerMessage
Job host started

Nothing happens after the Job host is started, i.e., the function ProcessTimerMessage is not called/executed. This is how the function looks:

public static void ProcessTimerMessage([TimerTrigger("0 */2 * * * *", RunOnStartup = true)] TimerInfo info, TextWriter log)
    {
        //function logic
    }

This is how the Main method looks like:

static void Main()
    {
            JobHostConfiguration config = new JobHostConfiguration();
            config.UseTimers();
            var host = new JobHost(config);
            host.RunAndBlock();
    }

The same is occurring even when I try to debug the webjob locally. What could be the possible reason/resolution?

Any help appreciated.

M_coder
  • 121
  • 3
  • 17
  • Could you show us some (relevant) code? Mainly interested in the TimerTrigger cron expression. – rickvdbosch Aug 23 '17 at 13:51
  • Edited the question to include function signature containing TimerTrigger CRON expression. – M_coder Aug 23 '17 at 15:13
  • Did you add `config.UseTimers();` in the main method? – rickvdbosch Aug 23 '17 at 15:16
  • Yes, added the main method in the question above for reference. – M_coder Aug 23 '17 at 15:39
  • This webjob was functioning as expected up till a few days ago. No new code has been committed to the webjob but it has started showing these problems only now. – M_coder Aug 23 '17 at 15:41
  • 1
    Are you using the same storage account for another webjob or another environment ? Have a look at this question: https://stackoverflow.com/questions/40296109/azure-webjob-timer-trigger-does-not-fire – Thomas Aug 23 '17 at 21:15
  • Turns out this was the problem. Although I had taken care to make the config read values from the key share, the key in the key share itself had incorrect value. The keys in both the environments were set to the same storage account, hence the issue. Thanks for the help. – M_coder Sep 01 '17 at 05:14

1 Answers1

3

What could be the possible reason/resolution?

As Thoms mentioned that it seems that the same storage account is used for another webjob or others.

We could debug it with following ways:

1.Try to use another storage account

2.Check the webjob log from the storage

We could get more info about Webjob log from the blog.

Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47
  • Turns out this was the problem. Although I had taken care to make the config read values from the key share, the key in the key share itself had incorrect value. The keys in both the environments were set to the same storage account, hence the issue. Thanks for the help. – M_coder Sep 01 '17 at 05:14