# .NET and More > Microsoft Azure and Cloud Dev >  Webjobs vs Azure Functions

## courtz

Hi there,

At the moment we use Azure Webjobs on our new Azure Devops Backups offering (there is a job going by the way - feel free to check the job boards!)

However I feel there is a shift by Microsoft to push Azure Functions instead. However in my research I cannot find anything that says that Azure functions are a really good fit for long-running jobs. Apparently if you use the premium version, it works but only for 30 minutes.

Some of our backups take longer than that.

What would you recommend?

----------


## jmcilhinney

I'm no expert in this area and I may not actually be able to help, but I thought I'd add my two cents.

My company deployed an app a year or two ago and we were looking at these two options and we ended up going with Azure Functions because there was something specific that Webjobs couldn't do, although I can't recall what it was right now. It's my understanding that Webjobs actually uses Azure Functions technology under the hood but exposes a subset of the functionality available.

One thing that sticks in my mind is that a Webjob could have lived in the same App Service as our web app while the Azure Function lives in its own App Service. We use the consumption plan and our functions are quick, so that's no big deal but, for longer-running functions, there may be additional expense involved. Your situation may well be different to ours but we almost certainly would have gone with a Webjob if we could have. As long as Webjobs are supported and satisfy your needs, I'd probably suggest sticking with them.

----------


## PlausiblyDamp

> Hi there,
> 
> At the moment we use Azure Webjobs on our new Azure Devops Backups offering (there is a job going by the way - feel free to check the job boards!)
> 
> However I feel there is a shift by Microsoft to push Azure Functions instead. However in my research I cannot find anything that says that Azure functions are a really good fit for long-running jobs. Apparently if you use the premium version, it works but only for 30 minutes.
> 
> Some of our backups take longer than that.
> 
> What would you recommend?


Functions are an evolution of WebJobs and can provide some nice features for developers, however they do have limits. 

When running as a consumption plan they are restricted to 10 minutes (5 by default) and aren't suited to long running jobs (especially as they are charged based on memory and time once you exceed the free limits).

If you want a long running function app you could deploy it to either a premium plan or on a normal App Service Plan - these have more of a fixed cost compared to consumption but don't have a maximum runtime and aren't charged based on duration either.

----------


## courtz

Thanks for the detailed answer




> If you want a long running function app you could deploy it to either a premium plan or on a normal App Service Plan - these have more of a fixed cost compared to consumption but don't have a maximum runtime and aren't charged based on duration either.


It seems like though they cannot guarantee it to run for longer than 60 minutes:

https://docs.microsoft.com/en-us/azu...r-run-duration

Perhaps we need to take the approach of dividing each individual repository backups into a separate functions runs

----------


## PlausiblyDamp

> Thanks for the detailed answer
> 
> 
> 
> It seems like though they cannot guarantee it to run for longer than 60 minutes:
> 
> https://docs.microsoft.com/en-us/azu...r-run-duration
> 
> Perhaps we need to take the approach of dividing each individual repository backups into a separate functions runs


Running them on a normal service plan should give you effectively unlimited time as long as you set it to "always on". Out of interest what are you doing as part of the backups? Are you using the cloud hosted Azure Devops?

----------

