views:

33

answers:

1

I've asked questions about Quartz.NET a lot today, but I'm making progress in understand and really appreciate you guys helping me. I now think I understand how the jobs work but I have one issue. For each job, they need to have 3-4 extra fields in the 'QRTZ_JOB_DETAILS', such as pathnames etc. I added these in, but how do I access this information in the jobs so I can use the data in these fields to carry out the job? For example, the job will need to move a file to the specified path, but I'm not sure how to pull the information from that column.

For the columns that are built into Quartz.NET, I know how to access these, which is by doing the following:

public virtual void Execute(JobExecutionContext context) {

    string isvolatile = context.JobDetail.Volatile.ToString();
    System.Console.WriteLine(isvolatile);

}

But no methods seem to exist for the new columns I have added. How do I access these?

Many thanks again

+1  A: 

Instead of adding columns to Quartz tables, take a look at JobDataMaps. These are persisted in the JOB_DATA column of the QRTZ_JOB_DETAILS table.

Mauricio Scheffer