Show job parameters in Dashboard

In the job listings you can see the Job which is the method name.
Right now you need to click the Job to see the details and see the method parameters.
I would like to see the job parameters directly in the listing.
Then I can easily identify each job instead of all of them looking the same in the listings.

This should be fairly easy to add right?

It’s not a good idea. For example if your job has 10 parameters how do I show all those parameters to the interface?

It’s possible. Just use following attributes:
[DisplayName("DoJob id={0}, par2={1}")] public void DoJob(string id, string par2){}

Wow, that works perfectly!

But how is that possible? I thought attributes could not accept parameters. How can I write such an attribute myself, where the method parameters are inserted in the attribute paramer?


I got it working inside my custom JobFilterAttribute

I can easily read the Job arguments from the FilterContext

public void OnCreating(CreatingContext filterContext)
	_groupName = string.Format(_groupName, filterContext.Job.Args.ToArray());

Could you please post the full JobFilterAttribute class? What I’m missing form your example is how to actually set the name to the job that will be displayed on the main job listing. All context parameters seem to be read-only and I do not see one labeled name or title.