1

is there a way to get the identities of the running Jobs from any class in C#? I'm using Quartz.net for creating jobs.

let's say i defined a job like:

IJobDetail job = JobBuilder.Create<Mailer>()
            .WithIdentity("MailJob", "group1")
            .UsingJobData("t2", "f2")
            .Build();

My idea is to create an overview of all running jobs, for that i want to get the name of each Job, e.g here MailJob to list it up in a table.

Thanks.

Leri
  • 12,367
  • 7
  • 43
  • 60
nova.cp
  • 455
  • 1
  • 9
  • 22
  • I tried to write a method like the following, but don't know how to get the right instance of the jobs from another class: public string getRunningJobs() { string running_jobs = ""; ISchedulerFactory scheduler = new StdSchedulerFactory(); IScheduler sched = scheduler.GetScheduler(); var executingJobs = sched.GetCurrentlyExecutingJobs(); foreach (var job in executingJobs) { running_jobs += job.JobDetail.Key; } return running_jobs; } – nova.cp Feb 27 '14 at 09:27
  • resolved with http://stackoverflow.com/questions/12489450/get-all-jobs-in-quartz-net-2-0 – nova.cp Feb 27 '14 at 10:35
  • Does this answer your question? [Get all jobs in Quartz.NET 2.0](https://stackoverflow.com/questions/12489450/get-all-jobs-in-quartz-net-2-0) – LiorH Sep 14 '22 at 10:53

0 Answers0