Reputation: 7457
Say I have this simple nodejs app and want to deploy it to Azure as a web app
to run in background:
//server.js
function test() {
// send some request to a url
}
setInterval(test, 10000);
So I'd do this on Heroku by adding a Procfile
and a command like worker: node server.js
, but what's the equal method for azure?
Upvotes: 1
Views: 1037
Reputation: 11177
Background tasks in Microsoft Azure App Service are called WebJobs. You can execute any of the following as a WebJob:
You can read more about WebJobs on Microsoft Azure official documentation center: Run Background tasks with WebJobs
Also, Scott Allen has nice tutorial on node.js and WebJobs: Azure WebJobs With Node.js
Upvotes: 2