Bugfix: Do not try to assign when job has no tasks

This bug would prevent the scheduler from running more than one job in
the same queue simultaneously.
Do not exceed jobtype's max_batch

Even if the batch setting for the current job is higher than that.