2

We have an Azure WebJob which is scheduled to run at 8:00 AM UTC daily(CRON - 0 00 08 * * *).Most of the days it is triggering correctly but on some days it is triggering twice (Second run is occurring ~10 secs after first run ). I can see in the web job history that when it triggered twice,first run's trigger property(from WebJob History JSON) is showing as "External - " and second run trigger property is showing as "Schedule - 0 0 8 * * *" but we don't have any external services triggering this WebJob.

When i checked the Job scheduler log for more details, "Web Job Invoked" status is only present for those days when the webjob got triggered twice.

  • This question is really hard to answer because we don't really know your environment. Maybe you can think again, what might cause the job external? Is there any service which calls the service? Is it maybe wrong configured? Maybe some screenshots of the configuration could help, but please don't include any internal data. – Larce Mar 01 '18 at 10:04
  • Hi Larce, Thanks for the comment. I have updated the question with more details. – Naveen Yamparala Mar 01 '18 at 14:17

1 Answers1

1

Your problem appears to be that you appear to have two different things triggering your WebJob:

  1. You probably have a settings.job (wiki) with a cron expression.
  2. You may also have an Azure Scheduler Job Collection hitting your WebJob from the outside (possibly with a different schedule, which is why they don't always match).

Suggestion is to get rid of #2, and only keep the internal WebJobs scheduling via settings.job.

David Ebbo
  • 42,443
  • 8
  • 103
  • 117
  • Thanks David. We are trying to figure out this with the help of admins as we couldn't see any Azure Scheduler Job Collection with our access level. As the Second run is happening soon after the first run(i.e not at constant time) I don't think that if a scheduler do exist, it is not having a different schedule than settings.job's CRON. My query is, if a scheduler and settings.job try to trigger webjob at the same time,does the second trigger request will be killed or is it queued to trigger after the first webjob execution happens? – Naveen Yamparala Mar 02 '18 at 09:06
  • Yes, you would get one after the other. Try turning on http logs, and look at the user agent of the external trigger. Might help you figure out where it's coming from. – David Ebbo Mar 02 '18 at 19:51
  • 1
    Thanks David. As you have suggested the issue is with the extra scheduler present along with settings.job. Initially, we are unable to see Azure Scheduler Job Collection because of the restricted access to Azure portal. – Naveen Yamparala Mar 07 '18 at 07:07