Provide a way to schedule worker roles so they only run when needed
If worker roles could be scheduled, like windows task scheduler then we would massively reduce the required cpu time used.
37 comments
-
Richard Conway
commented
You can do this with the WASABi application block running from an on-premise console app or windows service. It will support these kinds of constraints out of the box.
-
Chris Auld commented
As others have noted this is *possible* by doing an undeploy/redeploy when needed. it is *posible* but a total pain in the arse. Can I point you to my suggestion for allowing an instance count of Zero as a concrete idea to solve this problem. Then it becomes as simple as chaging the instnace count using the management API http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/743252-allow-a-role-instnace-count-of-0?ref=title
-
shannonwhitley commented
Hi Jeff,
Although I haven't gone through the process, you should be able to use the PowerShell Cmdlets to create and delete a deployment on a schedule:
http://wappowershell.codeplex.com/
You'll still need your dev box for scheduling so I guess it depends on your requirements.
-
Jeff Jorczak
commented
I just got off the phone with Azure Support and they told me to create a new worker role service every day, deploy and run the job, and then delete it all. Do this manually every day! Doesn't this defeat the purpose of having a service? I can run it manually on my dev box every day if I am going to have to be present when it runs.
-
Jeff Jorczak
commented
So without this, how it is possible to have a worker role consume a variable amount of time? It seems they will consume every hour since deployment.
-
vtortola
commented
I still don't understand how in a supposed "pay for what you use" system, we have to pay not only for idle time, but even for the time the app is deployed, running or not.
-
lars prahl
commented
Would be most helpful for applications that on a scheduled basis (nightly) only needs to email reports and status updates - a max 15 minute job.
-
Ben Callister
commented
I cannot express enough how important and needed this feature is for software frameworks/platforms (best designed around cloud platforms). Also, note that there are a handful of other top posted issues that are basically requesting the same thing. MS - please offer this soon!
-
Ben Callister
commented
i believe azure needs to go even further with this very important feature. customers should not have to pay for unused compute cycles - agreed. however, devs should be able to run their code *immediately*, when needed, avoiding the time cost of spinning up VMs, which takes minutes! if this was accomplished, then devs could provide *demand-scale* computational and algorithmic services! (e.g. think search engine - where you need N compute nodes NOW and you cant wait to spin up VMs). MS could offer this by having several VMs already running, and devs simply write a Task class that gets executed within N existing VM instances (as specified by dev, based on demand). MS would track the execution time on the VM and charge accordingly. however, once complete, the VM is available for the next customer to run their Task. this would not only achieve what others have desired on this thread, but would also enable *immediate* scale, on demand. PLEASE offer this!
-
JohnHadj
commented
This would really make Azure the platform of choice.
If a worker consumed processor resources only when it was needed and was "swapped out" when idle for a (configurable) time, it would make lightly used or periodically apps cheaper to host. -
eslsys
commented
Agree with all the comments below supporting this call, we need far greater control of worker roles. In essence, the worker role as it is now is 'anti-scalability' as we are paying for a worker role 24/7/365 that is redundant most of the time
-
Zdeněk Söhnel commented
I like this idea, the timed routines are commonly needed if it could save resources for long sleeps
-
JK
commented
would love it if this is possible.
-
George Bell
commented
I have a role that only processes something once a day, for 20 minutes....yet I got charged for it aall 24 hours - this is ridiculous...make it possible to only run a role during certain times...that way you can provision them for a short amount of time each day and we don't get charged as much for doing nothing...
-
Chris Nicola commented
I thought dynamic worker roles already did this?
-
hogi
commented
We need to run different nightly batches and it would be great if we could use worker roles for this. We have it working currently but we have our worker roles sleeping for 23 hours and 59 minutes and working for 1 minute but we have to pay for 24 hours..... It looks like Azure is not going to work for us since it will be WAY TOO expensive. MS are you listening? Maybe time to switch to Amazon, Rackspace etc????
-
luiz bicalho
commented
it's better to do as I said in other post (http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/1026521-connect-the-queue-directly-to-a-worker-role-so-it-?ref=title)
so the worker role stays offline and it only runs when there are items in the queue -
Rod Whisnant
commented
I do this today using Windows Azure Service Management CmdLets http://code.msdn.microsoft.com/azurecmdlets. You will however need to schedule your script to run on a box that will be up all the time (I use a dev server). Cuts WAY down on compute hours as I only need instances up during certain hours of the day.
-
Ray Smith
commented
Seems absolutely insane that this has not been provided. This has to be delivered for nightly polling worker roles to be cost effective on Azure platform. Is this purely an attempt by the MS Sales team to make money? Surely an MS Evangelist or Developer spotted this as being a big barrier.
-
butterball
commented
we need DTS/SSIS to schedule jobs!