You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have following code to run a job with 1 min interval.
I want my job to run simultaneously with 10 parallel and with parameters. However parameter may change during runtime. So parameter should be dynamic.
builder.Services.AddQuartz(q =>
{
// Get how many online item exist.
// However the result may change at runtime. so before executing main job, this query should be executed to get exist items
using (OracleDataAdapter odagetResult = new OracleDataAdapter("some query", cs))
{
odagetResult.Fill(dtOnlineItems);
}
// Below is current one. How can i convert it to 10 parallel, depends on above query result?
// If there will be 100 items, number should be 10 and that number should pass to jASH.
var jobKey = new JobKey("jASH");
q.AddJob<jASH>(opts => opts.WithIdentity(jobKey));
q.AddTrigger(opts => opts
.WithIdentity("jASH-trigger")
.ForJob(jobKey)
.StartNow()
.WithSimpleSchedule(x => x.WithIntervalInMinutes(1).RepeatForever())
);
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have following code to run a job with 1 min interval.
I want my job to run simultaneously with 10 parallel and with parameters. However parameter may change during runtime. So parameter should be dynamic.
Beta Was this translation helpful? Give feedback.
All reactions