Can you schedule a job in a job filter or job?


#1

I was wondering if you can schedule a job inside an existing job? E.g. if the job determined another job should be run after a later time? What about doing something like this in a job filter? I am wondering what the best approach is? Would it be better to return the new jobs as a result of the job and then use ContinueWith to schedule the new jobs?


#2

You can do this in an elect state filter by modifying the candidate state.


#3

Hmm, interesting I have to look into this. If I understand you correctly, you are suggesting to use a custom job filter and then let it change the state of the job to Elect so it will be picked up? Just wondering how often this job filter gets triggered


#4

any reason for going for a very complicated sounding solution rather than just doing client.enque(new job) in the job itself?


#5

Personally, I don’t like to add an extra dependency not really related to the job to be executed itself just to let it run on working days.