6

I am using quartz.net in my asp.net app and the quartz scheduler works when I am running on my localhost but when I publish the site to windows azure it no longer works. Any help would be much appreciated.

kylez
  • 121
  • 4
  • Can you describe your problem in more details? How are you using Quartz in your web role? What do you mean when you say `when I publish the site to windows azure it no longer works`. – Gaurav Mantri Aug 05 '13 at 12:51
  • Quartz is in the web role and is being started in the Global.asax. When I am running the site on my localhost the scheduler works just fine, however; when I publish my site on windows azure the scheduler does't work. The rest of the site works fine but the scheduler does run the assigned task. Thanks for your help. – kylez Aug 05 '13 at 13:03
  • Sorry for getting back and forth on this but can you share some code? Also, kind of off topic but have you considered hosting your scheduler in a worker role instead of a web role? IMHO, worker role is more suitable for running scheduled tasks. – Gaurav Mantri Aug 05 '13 at 13:48
  • I'm new to azure. I am looking into using a worker role right now. The more I look into it, I don't think I am currently using a web role. I am running it out of an ASP.net MVC4 web app. I am not sure that code will help because I think my project setup is all wrong for using a scheduler on azure. – kylez Aug 05 '13 at 14:07
  • I see. If you're interested in learning more about using Quartz in a Worker Role, I wrote a blog post sometime back which you may find useful: http://gauravmantri.com/2013/01/23/building-a-simple-task-scheduler-in-windows-azure/. – Gaurav Mantri Aug 05 '13 at 14:10
  • 1
    The problem wasn't that it wasn't running on the azure site. The problem was that azure was using UTC and my localhost was using local time. Since I was using a cron schedule and local time I wasn't seeing the scheduler fire. It is possible to run a quartz.net scheduler on azure without using web role/worker roles. This can all be done within the hosting website. – kylez Aug 05 '13 at 17:19
  • I am having the same problem, quartz.net is working on localhost but only works with RAM storage on azure. How did you solve it? I'm not sure it's UTC related but still. Thanks! @kylez –  Jul 19 '16 at 03:09

2 Answers2

6

The problem wasn't that it wasn't running on the azure site. The problem was that azure was using UTC and my localhost was using local time. Since I was using a cron schedule and local time I wasn't seeing the scheduler fire. It is possible to run a quartz.net scheduler on azure without using web role/worker roles. This can all be done within the hosting website.

kylez
  • 121
  • 4
0

The quartz.net is running in a shared application pool and in azure you dont have enough permission to do that, if you dont buy a Windows Server on Azure and use that server as your webserver.

Nils Anders
  • 4,212
  • 5
  • 25
  • 38
  • 1
    The problem wasn't that it wasn't running on the azure site. The problem was that azure was using UTC and my localhost was using local time. Since I was using a cron schedule and local time I wasn't seeing the scheduler fire. It is possible to run a quartz.net scheduler on azure without using web role/worker roles. This can all be done within the hosting website. – kylez Aug 05 '13 at 17:20