How do I run an Azure WebJobs locally with network failure resilient?

88 Views Asked by At

I have a small website depends on Azure WebJobs for some background tasks. Due to my basic plan, WebJobs just stops working within 1-2 hours after deployment to Azure, because I need to upgrade my plan.

Meanwhile I run the task on my local machine, and it works fine unless there is a wireless/network failure, apparently it is not network failure resilient. So it does not keep running when network is backup.

I have following basic setup:

 hostBuilder.ConfigureWebJobs(webJobsBuilder =>
            {
                webJobsBuilder
                    .AddTimers()
                    .AddAzureStorageCoreServices()
                    .AddAzureStorage()
                    .AddServiceBus();

            });

What I am thinking to run another console app to monitor running WebJobs executable and re-run process if it does not exists. But before I do that, I want to learn if there is anything else I can configure in the WebJobs app? I am considering Windows Task scheduler as well, but I don't want to over complicate things.

0

There are 0 best solutions below