Is there an easy way for a IJob to publish data from within the Job. I have a Job running an import process, but would like to retrieve the progress by looking up the Job and requesting it.
I thought that i may be able to use the JobDetails, but does not seem to reflect the changes made within the Job?
There isn’t a built-in way that would give you easily the thing you are looking for. But it isn’t that hard to publish progress info to some other facility via publish subscribe either. You could also periodically write progress info to persistent storage – that would also give you the benefit of easy retry when you know the last successful bit that was processed.
An outside thread/process could also determine the status if it polled the target where you are importing and you would have somewhere the info about total items that are going to be imported.
Quartz.NET jobs are units that are processed as an.. well unit and so there isn’t the notion of how much there is yet to be done. Or do you need this info in another job that depends on import process?