Hi,
I'm a new user...and am following a pretty simple sample using .NET C#
I'm using a SQL Server datastore. I have one sample job scheduled against 2 triggers. my job and its associated job data map sample is below.
List<DateTime> state = new List<DateTime>();
var jobDataMap = new Dictionary<string, object>
{
{ "job.bookmark", "some stuff" },
{ "job.mydate", System.DateTime.Now },
{ "myStateData", state },
{ "job.subscriberId", "more stuff" },
{ "job.machineName", "crazy stuff" }
};
IJobDetail job = JobBuilder.Create<Job>()
.RequestRecovery(true)
//.SetJobData(new JobDataMap(jobDataMap as IDictionary<string, object>))
.UsingJobData(new JobDataMap(jobDataMap as IDictionary<string, object>))
.WithIdentity("myJob", "group1") /
.Build();
When the job fires, I retrieve the value of the myStateData like using the code below and update it. The idea is to retrieve the empty collection, then add a new item each time the job fires.
List<DateTime> state = (List<DateTime>)context.JobDetail.JobDataMap["myStateData"];
state.Add(System.DateTime.UtcNow);
However, I'm finding that number of objects returned in the state collection (before I do the add) is always Zero, regardless if I have passed 2 or 3 different triggers with the Job to the scheduler.
I did however find that it does get incremented as expected if I use the In Memory store instead of SQL Server.
Does anyone know if there is some other setting I need to make this work with a persistent store like SQL server? Or is this just a bug?
kind regards,
--
You received this message because you are subscribed to the Google Groups "Quartz.NET" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quartznet+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quartznet/13926cf7-cd49-459a-ace1-c9c19404f8a4%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to quar...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to quar...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to quar...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to quar...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to quartznet+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quartznet/06ff6320-a394-4a27-ab56-f0f3b4394925%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quartznet/06ff6320-a394-4a27-ab56-f0f3b4394925%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quartznet/06ff6320-a394-4a27-ab56-f0f3b4394925%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to quartznet+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quartznet/e8f5f74f-3577-444b-8a2c-a15df6437016%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quartznet/e8f5f74f-3577-444b-8a2c-a15df6437016%40googlegroups.com.