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