Quartz scheduler not working on cloud service

I had deployed a cloud service in which i has use Quartz scheduler to run a particular task at a particular time (3:00 AM).

But the service does not run the scheduler at that time.

I had debugged it but not able to get the exact solution. 

If i deploy the app to local iis and check, it runs fine with the scheduler.

Does the cloud service recycles every 24 hrs, because Quartz scheduler will only hit if the app is running and ping after recycling.
Recycling happens in iis every 24 hrs so we need to hit the app manually for the scheduler to work.

so can you please assist me to get the issue why my scheduler is not working 

(Is it because of recycling ?)

 
June 24th, 2015 3:55am

Hi Aakash,

Could you tell us how you implement the Quartz Scheduler in your Azure Cloud Service?
The Cloud Service you're referring to, is it a web role?
When you say, the scheduler does not work, does it give any error messages or the scheduler runs at a different time or does not run at all?
It might be helpful to isolate and troubleshoot the issue better if you could provide further details.

You could refer the following link for some help:
http://mattrandle.me/azure-worker-role-and-quartz-net/

Also, you could consider using Azure Scheduler as well.
You could refer the following links for details on Azure Scheduler:
https://azure.microsoft.com/en-us/documentation/articles/scheduler-intro/
https://azure.microsoft.com/en-us/documentation/articles/scheduler-get-started-portal/

Regards,
Malar.


Free Windows Admin Tool Kit Click here and download it now
June 24th, 2015 6:30am

Hello Malar,

The Cloud service is a web role.

this link for "azure-worker-role-and-quartz-net"

explains for a worker role.

I am not able to get the exact issue nor able to get any exceptions because the scheduler is not hitting.

If the (Quartz .Net) scheduler got hit then only i will get some exception or cause, but the basic is not working (running the scheduler)

I have initialized scheduler in global.ascx.cs file by this line

 JobScheduler.Start(); 

and then in start :

public class JobScheduler
    {
        public static void Start()
        {
            // construct a scheduler factory
            ISchedulerFactory schedFact = new StdSchedulerFactory();

            // get a scheduler
            IScheduler sched = schedFact.GetScheduler();
            sched.Start();

            // define the job and tie it to our HelloJob class
            IJobDetail job = JobBuilder.Create<FetchFtpFilesAndSendToStorageJob>()
                .WithIdentity("FetchFtpFilesAndSendToStorageJob", "SyncData")
                .Build();

            // Trigger the job to run now, and then every day at 3:00 AM 
             ITrigger trigger = TriggerBuilder.Create()
                 .WithIdentity("FetchFtpFilesAndSendToStorageJobTrigger", "SyncData")
                 .WithCronSchedule("0 0 3 1/1 * ? *").ForJob(job)
                 .Build();
            
            sched.ScheduleJob(job, trigger);
        }
    }


but the trigger is not getting fired at the time specified.

Here if i add a webRole file like below :

 public class WebRole : RoleEntryPoint
    {
        public override bool OnStart()
        {
            JobScheduler.Start();
            return base.OnStart();
        }
    }


Will that work?

Thanks. :) 




  • Edited by Aakash P 20 hours 4 minutes ago
June 24th, 2015 7:15am

Hi Aakash,

Could you tell us how you implement the Quartz Scheduler in your Azure Cloud Service?
The Cloud Service you're referring to, is it a web role?
When you say, the scheduler does not work, does it give any error messages or the scheduler runs at a different time or does not run at all?
It might be helpful to isolate and troubleshoot the issue better if you could provide further details.

You could refer the following link for some help:
http://mattrandle.me/azure-worker-role-and-quartz-net/

Also, you could consider using Azure Scheduler as well.
You could refer the following links for details on Azure Scheduler:
https://azure.microsoft.com/en-us/documentation/articles/scheduler-intro/
https://azure.microsoft.com/en-us/documentation/articles/scheduler-get-started-portal/

Regards,
Malar.


Free Windows Admin Tool Kit Click here and download it now
June 24th, 2015 10:22am

Hi Aakash,

Could you tell us how you implement the Quartz Scheduler in your Azure Cloud Service?
The Cloud Service you're referring to, is it a web role?
When you say, the scheduler does not work, does it give any error messages or the scheduler runs at a different time or does not run at all?
It might be helpful to isolate and troubleshoot the issue better if you could provide further details.

You could refer the following link for some help:
http://mattrandle.me/azure-worker-role-and-quartz-net/

Also, you could consider using Azure Scheduler as well.
You could refer the following links for details on Azure Scheduler:
https://azure.microsoft.com/en-us/documentation/articles/scheduler-intro/
https://azure.microsoft.com/en-us/documentation/articles/scheduler-get-started-portal/

Regards,
Malar.


June 24th, 2015 10:22am

Hi Aakash,

Could you tell us how you implement the Quartz Scheduler in your Azure Cloud Service?
The Cloud Service you're referring to, is it a web role?
When you say, the scheduler does not work, does it give any error messages or the scheduler runs at a different time or does not run at all?
It might be helpful to isolate and troubleshoot the issue better if you could provide further details.

You could refer the following link for some help:
http://mattrandle.me/azure-worker-role-and-quartz-net/

Also, you could consider using Azure Scheduler as well.
You could refer the following links for details on Azure Scheduler:
https://azure.microsoft.com/en-us/documentation/articles/scheduler-intro/
https://azure.microsoft.com/en-us/documentation/articles/scheduler-get-started-portal/

Regards,
Malar.


Free Windows Admin Tool Kit Click here and download it now
June 24th, 2015 10:22am

Hi Aakash,

Could you tell us how you implement the Quartz Scheduler in your Azure Cloud Service?
The Cloud Service you're referring to, is it a web role?
When you say, the scheduler does not work, does it give any error messages or the scheduler runs at a different time or does not run at all?
It might be helpful to isolate and troubleshoot the issue better if you could provide further details.

You could refer the following link for some help:
http://mattrandle.me/azure-worker-role-and-quartz-net/

Also, you could consider using Azure Scheduler as well.
You could refer the following links for details on Azure Scheduler:
https://azure.microsoft.com/en-us/documentation/articles/scheduler-intro/
https://azure.microsoft.com/en-us/documentation/articles/scheduler-get-started-portal/

Regards,
Malar.


June 24th, 2015 10:22am

Hello Malar,

The Cloud service is a web role.

this link for "azure-worker-role-and-quartz-net"

explains for a worker role.

I am not able to get the exact issue nor able to get any exceptions because the scheduler is not hitting.

If the (Quartz .Net) scheduler got hit then only i will get some exception or cause, but the basic is not working (running the scheduler)

I have initialized scheduler in global.ascx.cs file by this line

 JobScheduler.Start(); 

and then in start :

public class JobScheduler
    {
        public static void Start()
        {
            // construct a scheduler factory
            ISchedulerFactory schedFact = new StdSchedulerFactory();

            // get a scheduler
            IScheduler sched = schedFact.GetScheduler();
            sched.Start();

            // define the job and tie it to our HelloJob class
            IJobDetail job = JobBuilder.Create<FetchFtpFilesAndSendToStorageJob>()
                .WithIdentity("FetchFtpFilesAndSendToStorageJob", "SyncData")
                .Build();

            // Trigger the job to run now, and then every day at 3:00 AM 
             ITrigger trigger = TriggerBuilder.Create()
                 .WithIdentity("FetchFtpFilesAndSendToStorageJobTrigger", "SyncData")
                 .WithCronSchedule("0 0 3 1/1 * ? *").ForJob(job)
                 .Build();
            
            sched.ScheduleJob(job, trigger);
        }
    }


but the trigger is not getting fired at the time specified.

Here if i add a webRole file like below :

 public class WebRole : RoleEntryPoint
    {
        public override bool OnStart()
        {
            JobScheduler.Start();
            return base.OnStart();
        }
    }


Will that work?

Thanks. :) 




  • Edited by Aakash P Wednesday, June 24, 2015 11:09 AM
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2015 11:07am

Hello Malar,

The Cloud service is a web role.

this link for "azure-worker-role-and-quartz-net"

explains for a worker role.

I am not able to get the exact issue nor able to get any exceptions because the scheduler is not hitting.

If the (Quartz .Net) scheduler got hit then only i will get some exception or cause, but the basic is not working (running the scheduler)

I have initialized scheduler in global.ascx.cs file by this line

 JobScheduler.Start(); 

and then in start :

public class JobScheduler
    {
        public static void Start()
        {
            // construct a scheduler factory
            ISchedulerFactory schedFact = new StdSchedulerFactory();

            // get a scheduler
            IScheduler sched = schedFact.GetScheduler();
            sched.Start();

            // define the job and tie it to our HelloJob class
            IJobDetail job = JobBuilder.Create<FetchFtpFilesAndSendToStorageJob>()
                .WithIdentity("FetchFtpFilesAndSendToStorageJob", "SyncData")
                .Build();

            // Trigger the job to run now, and then every day at 3:00 AM 
             ITrigger trigger = TriggerBuilder.Create()
                 .WithIdentity("FetchFtpFilesAndSendToStorageJobTrigger", "SyncData")
                 .WithCronSchedule("0 0 3 1/1 * ? *").ForJob(job)
                 .Build();
            
            sched.ScheduleJob(job, trigger);
        }
    }


but the trigger is not getting fired at the time specified.

Here if i add a webRole file like below :

 public class WebRole : RoleEntryPoint
    {
        public override bool OnStart()
        {
            JobScheduler.Start();
            return base.OnStart();
        }
    }


Will that work?

Thanks. :) 




  • Edited by Aakash P Wednesday, June 24, 2015 11:09 AM
June 24th, 2015 11:07am

Hello Malar,

The Cloud service is a web role.

this link for "azure-worker-role-and-quartz-net"

explains for a worker role.

I am not able to get the exact issue nor able to get any exceptions because the scheduler is not hitting.

If the (Quartz .Net) scheduler got hit then only i will get some exception or cause, but the basic is not working (running the scheduler)

I have initialized scheduler in global.ascx.cs file by this line

 JobScheduler.Start(); 

and then in start :

public class JobScheduler
    {
        public static void Start()
        {
            // construct a scheduler factory
            ISchedulerFactory schedFact = new StdSchedulerFactory();

            // get a scheduler
            IScheduler sched = schedFact.GetScheduler();
            sched.Start();

            // define the job and tie it to our HelloJob class
            IJobDetail job = JobBuilder.Create<FetchFtpFilesAndSendToStorageJob>()
                .WithIdentity("FetchFtpFilesAndSendToStorageJob", "SyncData")
                .Build();

            // Trigger the job to run now, and then every day at 3:00 AM 
             ITrigger trigger = TriggerBuilder.Create()
                 .WithIdentity("FetchFtpFilesAndSendToStorageJobTrigger", "SyncData")
                 .WithCronSchedule("0 0 3 1/1 * ? *").ForJob(job)
                 .Build();
            
            sched.ScheduleJob(job, trigger);
        }
    }


but the trigger is not getting fired at the time specified.

Here if i add a webRole file like below :

 public class WebRole : RoleEntryPoint
    {
        public override bool OnStart()
        {
            JobScheduler.Start();
            return base.OnStart();
        }
    }


Will that work?

Thanks. :) 




  • Edited by Aakash P Wednesday, June 24, 2015 11:09 AM
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2015 11:07am

Hello Malar,

The Cloud service is a web role.

this link for "azure-worker-role-and-quartz-net"

explains for a worker role.

I am not able to get the exact issue nor able to get any exceptions because the scheduler is not hitting.

If the (Quartz .Net) scheduler got hit then only i will get some exception or cause, but the basic is not working (running the scheduler)

I have initialized scheduler in global.ascx.cs file by this line

 JobScheduler.Start(); 

and then in start :

public class JobScheduler
    {
        public static void Start()
        {
            // construct a scheduler factory
            ISchedulerFactory schedFact = new StdSchedulerFactory();

            // get a scheduler
            IScheduler sched = schedFact.GetScheduler();
            sched.Start();

            // define the job and tie it to our HelloJob class
            IJobDetail job = JobBuilder.Create<FetchFtpFilesAndSendToStorageJob>()
                .WithIdentity("FetchFtpFilesAndSendToStorageJob", "SyncData")
                .Build();

            // Trigger the job to run now, and then every day at 3:00 AM 
             ITrigger trigger = TriggerBuilder.Create()
                 .WithIdentity("FetchFtpFilesAndSendToStorageJobTrigger", "SyncData")
                 .WithCronSchedule("0 0 3 1/1 * ? *").ForJob(job)
                 .Build();
            
            sched.ScheduleJob(job, trigger);
        }
    }


but the trigger is not getting fired at the time specified.

Here if i add a webRole file like below :

 public class WebRole : RoleEntryPoint
    {
        public override bool OnStart()
        {
            JobScheduler.Start();
            return base.OnStart();
        }
    }


Will that work?

Thanks. :) 




  • Edited by Aakash P Wednesday, June 24, 2015 11:09 AM
June 24th, 2015 11:07am

Hi Aakash,

I'm afraid this is not something that we can resolve through a forum post as more information would be needed.
It would also most likely be necessary to look at your deployment via a remote desktop session.
We would request you to raise a Technical Support Case for further assistance with this issue.
You could refer the following link to open a technical support case:
http://azure.microsoft.com/en-in/support/options/

Regards,
Malar.

Free Windows Admin Tool Kit Click here and download it now
June 29th, 2015 11:06pm

Hi Aakash,

I'm afraid this is not something that we can resolve through a forum post as more information would be needed.
It would also most likely be necessary to look at your deployment via a remote desktop session.
We would request you to raise a Technical Support Case for further assistance with this issue.
You could refer the following link to open a technical support case:
http://azure.microsoft.com/en-in/support/options/

Regards,
Malar.

June 30th, 2015 3:03am

Hi Aakash,

I'm afraid this is not something that we can resolve through a forum post as more information would be needed.
It would also most likely be necessary to look at your deployment via a remote desktop session.
We would request you to raise a Technical Support Case for further assistance with this issue.
You could refer the following link to open a technical support case:
http://azure.microsoft.com/en-in/support/options/

Regards,
Malar.

Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 3:03am

I got this working when i deployed my app in production slot.

Thanks for th

August 21st, 2015 5:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics